Nie można załadować pliku lub zestawu System.Runtime.CompilerServices.Unsafe
Wygląda na to, że zainstalowałeś pakiet System.Runtime.CompilerServices.Unsafe nuget 4.5.3 wersja. I odpowiada System.Runtime.CompilerServices.Unsafe.dll wersja zestawu 4.0.4.1 .
Sugestia
1) Spróbuj zarejestrować System.Runtime.CompilerServices.Unsafe wersja 4.0.4.1 do GAC, aby system mógł to zrobić.
-
Uruchom Wiersz polecenia dla programistów dla VS2019 jako administrator
-
typ:
cd xxxxx (the path of the the System.Runtime.CompilerServices.Unsafe 4.0.4.1) gacutil /i System.Runtime.CompilerServices.Unsafe.dll
2) Jeśli używasz projektów Net Framework z xxx.config plik, możesz użyć bindingRedirect.
Dodaj je w app.config plik lub web.config plik:
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe"
publicKeyToken="b03f5f7f11d50a3a"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1"
newVersion="4.0.4.1"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Poza , jeśli zaktualizujesz System.Runtime.CompilerServices.Unsafe wersję pakietu nuget na nowszą wersję, należy również zmienić wersję zestawu bindingRedirect.
Możesz odwołać się do tych wersji zestawu System.Runtime.CompilerServices.Unsafe
4.5.x jest System.Runtime.CompilerServices.Unsafe Wersja pakietu nuget, gdy 4.0.x.x to System.Runtime.CompilerServices.Unsafe.dll wersja zespołu.
4.5.0 is 4.0.4.0
4.5.1 is 4.0.4.0
4.5.2 is 4.0.4.0
4.5.3 is 4.0.4.1
4.6.0 is 4.0.5.0
4.7.0 is 4.0.6.0
4.7.1 is 4.0.6.1
5.0.0 is 5.0.0.0