I tried to precompile my ASP.NET MVC application and deploy it to an IIS6 box (with wildcard mapping), however I am getting an error with rendering partial views (user contr
Although you can precompile an MVC site the ascx and aspx view files are not in the compiled dll only the .cs files are. You will still need to deploy the .aspx and .ascx view files.
Hope this helps
You can precompile an MVC app by placing this in the post-build actions in project properties:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler -p "$(ProjectDir)." -v /$(ProjectName)
This takes a little longer than without it, however you get the added ability to detect some errors that would occur at runtime prior to deployment.
Compilation will fail if you have invalid code in your views or are missing views by using this method.