Could not load file or assembly System.Runtime, Version=4.1.2.0

The Assembly Binding’s might be wrong.

DELETE the app.config or web.config AssemblyBinding sections. Then run this BindingRedirect in the Package Manager window:

Get-Project –All | Add-BindingRedirect

Optional: If you upgrade the framework version of all projects, you will need to reinstall all Nuget packages for all projects. To do that easily use this package managers script:

Get-Project –All | % { Get-Package -ProjectName $_.ProjectName | % { update-package $_.Id -reinstall -ProjectName $_.ProjectName -ignoreDependencies } }

Then run the Binding Redirect code above.

Leave a Comment

tech