Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Why doesn't assembly redirecting work in my project

$
0
0

In a VB project I'm using Add-in-Express (v905-b4661-vs-std) and NuGet package Azure.Storage.Files.Shares (12.8.0) (Visual Studio 16.11, DotNet 4.7.2) and got a problem:

Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe,Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.The located assembly's manifest definition does not match the assembly reference.(Exception from HRESULT: 0x80131040)

I tried to fix this via assembly redirecting by adding this to the configuration section of my app.config file:

<runtime><dependentAssembly><assemblyIdentity name="System.Runtime.CompilerServices.Unsafe"                      publicKeyToken="b03f5f7f11d50a3a"/><bindingRedirect oldVersion="4.0.4.1" newVersion="4.0.6.0"/></dependentAssembly></runtime>

But the error still pops up (I've tried with the Auto-generate binding redirects checked and unchecked for my project, but that doesn't seems to make a difference).

Also I used 4.0.5.0 as new version, as this was reported as the assembly version when I chacked it via the Powershell command [reflection.assemblyname]::getassemblyname('X.dll').versionon the ... CompilerServices.unsafe dll which was in the project's ...bin\debug folder after building, but the error still pops up.

Any idea why the redirection doesn't (seem to) work here?.

BTW: I found the version checking command in another post; don't remember which one, so I can't thank the author, but it's the easiest solution for that I've seen so far.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>