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...

 <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
 <bindingRedirect oldVersion="" newVersion="" />

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


  1. This comment has been removed by the author.

  2. Hey, just put this error into google and found this fix. Posting to say thanks!


Commenting is allowed!