Hi folks,
My console app (FW 4.7) raises this exception:
"An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module.
Could not load file or assembly 'System.Runtime, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies."
app.config:
<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>
Project has this line AutoGenerateBindingRedirects set to true:
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
Package.config:
<packages>
<package id="System.Runtime" version="4.3.0" targetFramework="net47" />
</packages>
My new netstandard lib is 1.6 version. It has System.Runtime version 4.3.0.0.
I have tested, but raises same execption:
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
</dependentAssembly>
I followed link [https://msdn.microsoft.com/en-us/library/2fc472t2(v=vs.110).aspx]
I can't understand why recent created projects raises this exception. What is wrong? I did no problems with Visual Studio 2015 but I waste hours with these kind of errors after Visual Studio 2017 v15.2 releases
Thanks
Seems Update-Package -reinstall solves my issue.
I do not understand why I have to run it every time I add nuget references ....
Most helpful comment
Seems Update-Package -reinstall solves my issue.
I do not understand why I have to run it every time I add nuget references ....