Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating System.Buffers in .Net Framework project breaks dll-mapping to libsasshost version #51

Closed
PatrickDahlin opened this issue Apr 4, 2022 · 2 comments

Comments

@PatrickDahlin
Copy link

PatrickDahlin commented Apr 4, 2022

When updating System.Buffers from the dependency 4.0.0 to any newer version on nuget, the loading of LibSassHost-dll fails because of "missing System.Buffers 4.0.0" dll.

Could not load file or assembly 'System.Buffers, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
@Taritsyn
Copy link
Owner

Taritsyn commented Apr 4, 2022

Hello, Patrick!

In my opinion, this problem occurs at the level of developer tools: Visual Studio or NuGet package manager. This problem can be solved by manually editing the Web.config file:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  …
  <runtime>
    …
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      …
      <dependentAssembly>
        <assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
      </dependentAssembly>
      …
    </assemblyBinding>
    …
  </runtime>
  …
</configuration>

Where 4.0.3.0 is the assembly version (not the package).

@PatrickDahlin
Copy link
Author

I see, that would explain the differences I saw between machines. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants