Frage

I keep running into the following exception

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0234: The type or namespace name 'WebViewPage' does not exist in the namespace 'System.Web.Mvc' (are you missing an assembly reference?)

Source Error:

Line 27: Line 28: Line 29: public class _Page_Views_Content_Index_cshtml : System.Web.Mvc.WebViewPage { Line 30: Line 31: #line hidden

Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\8df93262\ed60a52a\App_Web_index.cshtml.eba9863.jffbohqj.0.cs Line: 29

So far doing a clean and a rebuild normally fixes the problem. The Dev Environment is using IIS, it seems like something is going wrong when IIS caches the binaries. From some trial and error it seems like the issue happens if a request is made to the site at the same time as the site is being built.

Does anyone have any idea what might be causing the problem? It seems to be a configuration issue as other developers with the same setup do not have the issue.

War es hilfreich?

Lösung

It turned out to be the references in the project were falling back to a different version of MVC.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top