2
votes

After an update on visual studio enterprise 2015 i get the following error:

{"Could not load file or assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.":"System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"}

I dont get an error when i build the project. This comes after building when a procedure is called. I ve tried a lot of solution but none have worked.

In another remote pc, I don't have this error. I have visual studio community edition there.

Any ideas? Thank you in advance.

1
You can try to get it from the package manager. Tools - NuGet Package Manager - Manage for solution - Browse - System.Runtime - jjmcc
Didn't work! I downgrade to v 4.0.0.0 but i get the same error! - Xaris Ko
Problem solved after i download VS2017. - Xaris Ko

1 Answers

0
votes

Getting this issue in Visual Studio 2019 (Version 16.8.4). After doing a nuget reinstall.

Going into the web.config and removing the following lines resolved issue.

      <dependentAssembly>
        <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Runtime.InteropServices" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Runtime.Extensions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
      </dependentAssembly>