System.Web.Optimization and Microsoft.Web.Optimization won't load reference in vs 2012

前端 未结 12 1272
被撕碎了的回忆
被撕碎了的回忆 2021-02-05 01:46

I\'m working on an MVC 4 project started in Visual Studio 2010. Right now I\'m working on a machine with Visual Studio 2012 as I don\'t have access to the machine I was original

相关标签:
12条回答
  • 2021-02-05 02:32

    I know there are many answers to this issue, but give this a try- open the project in visual studio as an Administrator.It did solve in my case.

    0 讨论(0)
  • 2021-02-05 02:34

    I fixed this issue by setting the reference to the assembly System.Web.Optimization.dll to copy local to true.

    0 讨论(0)
  • 2021-02-05 02:34

    Simple Solution. Open Visual Studio in administrator mode. It will resolve your error.

    0 讨论(0)
  • 2021-02-05 02:36

    I had the same problem with a VS2010 project I opened in VS2012. The Microsoft.AspNet.Web.Optimization package was missing so I just needed to download it using Nuget Package Manager.

    You can run in the console: Install-Package Microsoft.AspNet.Web.Optimization

    0 讨论(0)
  • 2021-02-05 02:42

    Uninstalling, and reinstalling the Microsoft.AspNet.Web.Optimization package solved it for me.

    0 讨论(0)
  • 2021-02-05 02:45

    Try going to the web.config in the Views folder and removing the following line:

            <add namespace="System.Web.Optimization" />
    

    That fixed it for me.

    0 讨论(0)
提交回复
热议问题