To publish an ASP. net mvc project, you must modify copy local in project references.
Test environment:
Window Server 2008 +. Net 4.0 + iis7 + SQL Server 2008
Problem:
After the compiled release package is imported to iis7, cannot load assembly system. Web. helpers/system. Web. MVC/system. Web. Razor appears in the browser browse Web site.
The corresponding assembly cannot be found in the GAC of the server.
Solution:
Modify the copy local attribute of the MVC-related Assembly to true:
Microsoft. Web. Infrastructure
System. Web. Category actions
System. Web. Extension
System. Web. MVC
System. Web. Routing
System. Web. helpers
System. Web. Razor
System. Web. webpages
System. Web. webpages. Deployment
System. Web. webpages. Razor
Of course, if GAC can find the corresponding assembly on the service (the version and publickeytoken must be the same !) You do not need to set copy local = true.
PS: GAC directory-% Windir % \ Microsoft. NET \ assembly