It says "Could not load file or assembly System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0 while importing visual studio project"
I am using VS 2019 Community and AdvancedInstaller 2020 R1. Here is the list of packages for VS:
ASP.NET and web development
.NET desktop development
Desktop developing with C++
Visual Studio extension development
.NET Core cross-platform development
I saw people resolve the issue by adding bindings. But it didn't work for me. Here is my App.config file.
Code: Select all
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
</startup>
<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>
FOLLOW US
Get the latest news in Application Packaging