views:

45

answers:

0

I'm using the new Razor ViewEngine with ASP.NET 4/ASP.NET MVC 3.

In both Cassini on my local machine (Win7 x64/VS 2010), as well as IIS7 (Windows Web Server 2008), I'm randomly getting "Could not load file or assembly" errors.

With Cassini, rebuilding the solution generally fixes the problem.

In IIS7, recycling the application pool generally fixes the problem.

It is always the same assembly - a "Core" project of mine that is referenced by the ASP.NET MVC project. The solution hierarchy looks like this:

  • "Core" project (this is the one identified in the "Could not load file or assembly" error)
  • "Data" project (LINQ-to-SQL models)
    • Core
  • ASP.NET MVC Site
    • Core
    • Data

All these references are project references. The stack trace of the error starts in the "Data" project, which references the "Core" project. Any ideas?