Reputation: 972
From time to time I get "Compilation Error" CS0042 yellow page: https://i.sstatic.net/Hwfip.png
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
Reputation: 1539
In your Web.config file remove attribute
optimizeCompilations="true"
(from section <compilation />
)
Upvotes: 3
Reputation: 4010
According to this blog post, the problem is very much similar with yours. Please try the following things mentioned in the post:
- Exit VS.NET, restart VS.NET and reopen project
- Change project from Debug Build to Release Build and visa-versa.
- Remove all Enums from classes and just use in the namespace
- 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