pinus.acer
pinus.acer

Reputation: 972

ASP.NET MVC and Visual Studio 2013: Compilation Error

From time to time I get "Compilation Error" CS0042 yellow page: https://i.sstatic.net/Hwfip.png

Compilation Error yellow page

It happens when I change something (i.e. .cshtml file code) when my application is running. In VS 2012 it caused no problems. Some of my co-workers using VS 2013 have the same issue. Why App_GlobalResources.PDB file causes the problem?

Anyone has the same problem?

Upvotes: 5

Views: 3199

Answers (2)

Tomasz Maj
Tomasz Maj

Reputation: 1539

In your Web.config file remove attribute optimizeCompilations="true" (from section <compilation />)

Upvotes: 3

albusshin
albusshin

Reputation: 4010

According to this blog post, the problem is very much similar with yours. Please try the following things mentioned in the post:

  1. Exit VS.NET, restart VS.NET and reopen project
  2. Change project from Debug Build to Release Build and visa-versa.
  3. Remove all Enums from classes and just use in the namespace
  4. Ensure all DLL projects have ‘CopyLocal’ set to true AND references to these DLL’s be a Project Reference and not simple a DLL reference.

If it's not working, it should be a bug presented in the Visual Studio 2013 then.

Hope it helps.

Upvotes: 1

Related Questions