have everything working fine with mvc.razor generator. Views from my library project show up fine in my web-site. It is a .net 4.0, MVC4, EF5 project. The app pool is set to .net 4.0 in IIS.
When I deploy to the server, I am getting an exception when it tries to load the PrecompiledMvcEngine type. Here is the exception (I have attached the full output of error in attachments):
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
System.Reflection.Assembly.GetTypes() +159
RazorGenerator.Mvc.PrecompiledMvcEngine..ctor(Assembly assembly, String baseVirtualPath) +1209
RazorGenerator.Mvc.PrecompiledMvcEngine..ctor(Assembly assembly) +53
MyProj.Common.App_Start.RazorGeneratorMvcStart.Start() in E:\UserFiles\sheam\Documents\Visual Studio 2010\Projects\MyProj\Project.Common_vs2010\App_Start\RazorGeneratorMvcStart.cs:11
As you can see this is coming from my common project.
Here are the contents of the bin director:
2012-10-17 09:06 PM <DIR> .
2012-10-17 09:06 PM <DIR> ..
2012-10-10 12:51 AM 105,528 Antlr3.Runtime.dll
2012-10-09 07:05 PM 1,118,296 EntityFramework.dll
2012-10-16 01:26 PM 359,424 MyProj.Common_vs2010.dll
2012-10-16 01:26 PM 112,128 MyProj.Common_vs2010.pdb
2012-10-09 06:46 PM 45,416 Microsoft.Web.Infrastructure.dll
2012-10-17 09:06 PM 29,696 MyProj.dll
2012-10-17 09:06 PM 42,496 MyProj.pdb
2012-10-13 08:04 PM 15,872 Mvc.Mailer.dll
2012-10-09 06:46 PM 374,784 Newtonsoft.Json.dll
2012-10-09 06:56 PM 15,872 RazorGenerator.Mvc.dll
2012-10-09 06:46 PM 180,832 System.Net.Http.dll
2012-10-09 06:46 PM 168,544 System.Net.Http.Formatting.dll
2012-10-09 06:46 PM 16,480 System.Net.Http.WebRequest.dll
2012-10-09 06:46 PM 138,328 System.Web.Helpers.dll
2012-10-09 06:46 PM 323,168 System.Web.Http.dll
2012-10-09 06:46 PM 73,312 System.Web.Http.WebHost.dll
2012-10-09 06:46 PM 506,976 System.Web.Mvc.dll
2012-10-10 12:51 AM 54,912 System.Web.Optimization.dll
2012-10-09 06:46 PM 264,792 System.Web.Razor.dll
2012-10-09 06:46 PM 41,048 System.Web.WebPages.Deployment.dll
2012-10-09 06:46 PM 204,376 System.Web.WebPages.dll
2012-10-09 06:46 PM 39,512 System.Web.WebPages.Razor.dll
2012-10-09 06:56 PM 8,704 WebActivator.dll
2012-10-10 12:51 AM 963,640 WebGrease.dll
24 File(s) 5,204,136 bytes
2 Dir(s) 1,519,661,289,472 bytes free
RazorGenerator.Mvc.dll exists in there, so I am not sure why it can't load the type.
The server is a fresh install if W7 Pro.