Could not load file or assembly 'WebGrease, Version=1.5.1.25624, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies

前端 未结 18 1788
夕颜
夕颜 2021-01-31 07:02

I have an MVC4 Web API project. While running the service project I am getting an error

Could not load file or assembly \'WebGrease, Version=1.5.1.25624,

18条回答
  •  难免孤独
    2021-01-31 07:33

    I used "Install-Package Microsoft.AspNet.Web.Optimization" (current version is 1.1.3) for starup web-project, which was not selected in NuGet console by default.

    But NuGet has created a new app.config file even though web.config is expected to be updated.

    For me it worked to move WebGrease dependentAssembly element from app.config to web.config's ....

提交回复
热议问题