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

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

    For me, none of above scenarios worked.

    After trying for two days, finally i found the solution.

    What i did was, i uninstalled Microsoft.AspNet.Web.Optimization and WebGrease both.

    I knew that this optimization assembly internally refers to WebGrease 1.5.1. So i chose a version of optimization which does not refer to WebGrease 1.5.1.

    I ran following commands in order to make everything work.

    Uninstall-Package Microsoft.AspNet.Web.Optimization
    Uninstall-Package WebGrease
    Install-Package Microsoft.AspNet.Web.Optimization -Version 1.1.0
    

    I hope i will be able to be a good help for someone for whom above solution does not work.

    Cheers!

提交回复
热议问题