- Notifications
You must be signed in to change notification settings - Fork 6k
Open
Labels
help wantedGood for community contributors to help [up-for-grabs]Good for community contributors to help [up-for-grabs]
Milestone

Description
Currently, assembly binding redirection documentation is messy and difficult to locate. This is especially true if you're not able to use automatic binding redirection, such as if you are:
- Writing unit tests (which compile to DLLs, and don't get automatic binding redirects)
- Writing DLLs that are consumed in dynamic languages (Powershell, Python)
Most of the documentation is spread across multiple documentation pages, and the bulk of it is not written for .NET Core. Unfortunately, it's incredibly easy to end up with binding redirect problems if you're consuming .NET Standard DLLs from a project that targets either .NET Framework or dual-targets Framework and Core.
This can be improved by:
- Documenting where to include redirect generation options in a .NET Core csproj file (and what the options do)
- Improving documentation on how to force generation of a .config redirect file, even on DLL targets (see Binding Redirects necessary to run Unit Tests on .NET Framework are not preserved when running in
testhost
microsoft/vstest#428 (comment)). This is necessary to get unit tests to work. - Documenting that automatic binding redirection fails when compiling DLLs that will be consumed by dynamic languages. This is currently not documented.
- Including examples on how to programmatically add binding redirects to work around the issue. There's an excellent example here that can likely be used, which just a few extra lines to show how to attach the event handler. (https://github.com/Microsoft/dotnet-apiport/blob/dev/src/ApiPort.VisualStudio/AssemblyRedirectResolver.cs)
divega
Metadata
Metadata
Assignees
Labels
help wantedGood for community contributors to help [up-for-grabs]Good for community contributors to help [up-for-grabs]