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

前端 未结 18 1787
夕颜
夕颜 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:39

    I've faced the excat same issue and managed to fix it by doing the following:

    1. Uninstalling the Microsoft.AspNet.Web.Optimization nuget package.
    2. Uninstalling the Antlr nuget package because its a dependecy for WebGrease package.
    3. Uninstalling the WebGrease nuget package.
    4. Install Microsoft.AspNet.Web.Optimization nuget package again, this action will take care of installing Antlr and WebGrease because they are its dependencies.

提交回复
热议问题