[Visual Studio][ASP.NET MVC C#] frequently error messages summarization | CodingSchnauzer
 

[Visual Studio][ASP.NET MVC C#] frequently error messages summarization

| 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

 


Leave a Reply

Your email address will not be published. Required fields are marked *

CodingSchnauzer ©2020. All Rights Reserved.