Nov 17, 2012 at 4:43 PM
Edited Nov 17, 2012 at 4:43 PM
|
Hello,
I am using T4MVC and I created a Sitemap on a different class library.
Basically the sitemap accepts profiles based on the following:
public class SitemapProfileBase {
private readonly IList<SitemapNode> _nodes;
public IList<SitemapNode> Nodes { get { return _nodes; } }
public SitemapProfileBase() {
_nodes = new List<SitemapNode>();
} // SitemapProfileBase
public void Add(ActionResult location, SitemapFrequency? frequency = null, DateTime? modified = null, Double? priority = null) {
_nodes.Add(new SitemapNode(location, frequency, modified, priority));
} // Add
}
So then in my MVC application I create a profile:
public class SitemapProfile : SitemapProfileBase {
public SitemapProfile() {
Add(MVC.Home.Index().GetRouteValueDictionary(), SitemapFrequency.Daily, DateTime.UtcNow, 1.0);
} // Build
} // SitemapProfile
But when I add it to my Sitemap in global.asax I get an error:
The type initializer for 'MVC' threw an exception.
StructureMap Exception Code: 202\nNo Default Instance defined for PluginFamily MVCSite.ITranslator
The point is that there is not ITranslator being used in Sitemap ... Only in MVC.Home.Index action ...
Inside my Sitemap I am using T4MVC extensions to generate URL using UrlHelper.Action.
Any idea what might be wrong?
Thank You,
Miguel
|