The type or namespace name 'Mvc' does not exist

后端 未结 3 1995
粉色の甜心
粉色の甜心 2021-01-31 14:16

I have recently installed visual studio 2013. After downloaded a sample project from web, while i run it, it gives me the following errors-

The type or namespace         


        
3条回答
  •  长发绾君心
    2021-01-31 14:51

    Sometimes the package version conflict becomes an issue where if you have the MVC package installed then it shows the namespace error.

    Here is how I solved it:

    • Open Package Manager Console (Tools > NuGet Package Manager > Package Manager Console)
    • Type uninstall-package Microsoft.AspNet.Mvc
    • Type install-package Microsoft.AspNet.Mvc

    So this will give your package a fresh start, you will have all new MVC references and no errors.

提交回复
热议问题