Could not load file or assembly 'WebGrease' or one of its dependencies

前端 未结 9 1513
醉梦人生
醉梦人生 2020-12-14 00:04

When I run my MVC4 Web application it gives the following error:

Could not load file or assembly \'WebGrease\' or one of its dependencies. The located assemb         


        
相关标签:
9条回答
  • 2020-12-14 00:37

    This problem occurs when your referenced dll may different from your web.config file configuration. You need to reinstall the dll.

    0 讨论(0)
  • 2020-12-14 00:39

    Replace:

    <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />

    For:

     <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-1.3.0.0" newVersion="1.3.0.0" />
    
    0 讨论(0)
  • 2020-12-14 00:43

    Check the contents of runtime/assemblyBinding section in web.config. I found incorrectly registered dependentAssembly elements after installing Kendo UI package. I manually removed duplicates and the problem disappeared.

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