https://github.com/sandersade/assemblyrebinding
Parse .NET build error messages to binding redirects
https://github.com/sandersade/assemblyrebinding
assembly-rebinding assembly-references dotnet-build error-parser visual-studio
Last synced: 11 months ago
JSON representation
Parse .NET build error messages to binding redirects
- Host: GitHub
- URL: https://github.com/sandersade/assemblyrebinding
- Owner: SanderSade
- License: mpl-2.0
- Created: 2019-01-22T11:04:15.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-22T13:22:09.000Z (over 7 years ago)
- Last Synced: 2025-03-25T19:46:41.346Z (about 1 year ago)
- Topics: assembly-rebinding, assembly-references, dotnet-build, error-parser, visual-studio
- Language: C#
- Homepage:
- Size: 76.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
## AssemblyRebinding
[Get AssemblyRebinding from Releases](https://github.com/SanderSade/AssemblyRebinding/releases)
If you have been programming .NET, chances are that these are very familiar messages:
```
1> Consider app.config remapping of assembly "System.Runtime.Serialization.Primitives, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Runtime.Serialization.Primitives.dll] to Version "4.2.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Runtime.Serialization.Primitives.dll] to solve conflict and get rid of warning.
1> Consider app.config remapping of assembly "System.Runtime.Serialization.Xml, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Runtime.Serialization.Xml.dll] to Version "4.1.3.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Runtime.Serialization.Xml.dll] to solve conflict and get rid of warning.
1> Consider app.config remapping of assembly "System.Security.Cryptography.Algorithms, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "0.0.0.0" [] to Version "4.3.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Security.Cryptography.Algorithms.dll] to solve conflict and get rid of warning.
```

These messages during build are especially common after changing the target .NET framework. Visual Studio is supposed to fix these by itself when `true` in the .csproj is true, but unfortunately this isn't the case.
AsssemblyRebinding utility processes these messages and puts out the binding redirect (remapping) entries suitable for App.config or Web.config:
```
```

* If the "from" version is 0.0.0.0, AssemblyRebinding sets maximum "oldVersion" value to 255.255.255.255, e.g. `oldVersion="0.0.0.0-255.255.255.255"`
* I recommended to run in NuGet Package Manager Console the redirect updating command, `Add-BindingRedirect *` after adding binding redirects
* .NET 4.6.2 or newer required to run AssemblyRebinding
* Read more from https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/redirect-assembly-versions
#### Version info
* 2019-01-20 1.0.0 Initial version