Ninject.MVC3 invalid path to NinjectWebCommon.cs

857 Views Asked by At

I'm using the Ninject.MVC3 in my application and it has been working great until I desided to rename my solution/projects. Everything has been renamed correctly and all tests passes and so on. The one thing that does not work is the generated NinjectWebCommon class.

This line:

bootstrapper.Initialize(CreateKernel);

Throws this exception:

System.InvalidOperationException: Sequence contains no elements

When I look at the "yellow screen of death" I see that the source file of NinjectWebCommon.cs is totally wrong. It's the path that was accurate before the projects got renamed.

I've checked all paths in the .proj files and can't find any error there. I've also tried to throw away the app_start folder and re-installing the nuget packages.

Any suggestions.

1

There are 1 best solutions below

0
On BEST ANSWER

Finally solved this one by clearing the web site cache:

%LocalAppData%\Microsoft\WebsiteCache