S#arpLite: “At least one ISessionFactory has not been registered with IoC”, Darn with the redirections…

Yesterday I installed ASP .NET MVC 4 beta so I can play with it for a couple days. To be honest, I haven’t built one simple app because I haven’t had the time to do it, but I popped up my Visual Studio 2010 today and booted a S#arp lite project from the template. As usual, I made my move to Fluent nHibernate but when I loaded the project:

After spending a couple hours digging my way into my machine and debugging I went into the S#arp Lite discussion group and found this post of somebody having the same issue, finally the last answer hit the nail:

Have you installed MVC4 on you machine? If yes, check reference in Init project, it references MVC4 whereas Web project references MVC3.

Mmmmm… I did… so I tried this…

<dependentAssembly>
 <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
 <bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
 

Voilà! It works now… Darn with the redirections…

3 thoughts on “S#arpLite: “At least one ISessionFactory has not been registered with IoC”, Darn with the redirections…”

Leave a Reply

Your email address will not be published. Required fields are marked *