Upgrading WebGrease to version 1.3.0 gets me error

后端 未结 14 2106
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-23 14:05

While upgrading WebGrease to version 1.3.0 gets me error:

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

相关标签:
14条回答
  • 2020-12-23 14:39

    A combination of the following resolved the issue for me. First, running the following commands on the Package Manager command line (similar to the answer provided by sec_goat, but not exactly the same):

    Uninstall-Package Microsoft.AspNet.Web.Optimization
    Uninstall-Package WebGrease
    Install-Package Microsoft.AspNet.Web.Optimization
    Update-Package WebGrease
    

    Then, similar to Hriju, I needed to change this line in my web.config:

    <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-1.3.0.0" newVersion="1.3.0.0" />
    

    into this:

    <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-1.3.0.0" />
    
    0 讨论(0)
  • 2020-12-23 14:39

    The binding redirect that worked for me:

    <dependentAssembly>
      <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
      <bindingRedirect oldVersion="0.0.0.0-1.2.0.0" newVersion="1.3.0.0"/> </dependentAssembly>
    </assemblyBinding>
    

    subtle difference is i didn't include this version (1.3.0.0) in the oldVersion attr.

    fail cake!

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