0
[Visual Studio][ASP.NET MVC C#] frequently error messages summarization
February 10, 2018
|
Posted in Programming
I have summarized the frequently error messages, you could refer to this article.
Hope it’s helpful.
- The type or namespace name ‘ConfigurationManager’ does not exist in the namespace ‘System.Configuration’
- Solution:
Step 1. right click References at Solution Explorer, click add references
Step 2. select Assemblies at left tab, and check System.Configuration
- does not contain a static ‘Main’ method suitable for an entry point … CSC Core
- Solution: remember change project output type
- Updating ‘Microsoft.AspNet.Razor 3.2.3’ to ‘Microsoft.AspNet.Razor 2.0.20505.0’ failed. Unable to find versions of ‘Microsoft.AspNet.WebPages, Microsoft.AspNet.Mvc’ that are compatible with ‘Microsoft.AspNet.Razor 2.0.20505.0’.
- Solution: Install MvcSiteMapProvider MVC 5 from Nuget
- Microsoft.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null’ uses ‘System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ which has a higher version than referenced assembly ‘System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35
- Solution: Install Microsoft.AspNet.Mvc from NuGet
Update-Package
or
Install-Package Microsoft.AspNet.Mvc -Version 5.2.3
- CS0103: The name ‘Scripts’ does not exist in the current context
- Solution: Add <add namespace=”System.Web.Optimization” /> to web.config