This question pertains to .NET 5+, not .NET Framework.
Consider the following dependency tree:
MyWebsite
has package references toRandomWebLibrary
1.0.0 andRandomJsonLibrary
2.0.0.- The NuGet package
RandomWebLibrary
1.0.0 has a package reference toRandomJsonLibrary
1.0.0. - The NuGet package
RandomJsonLibrary
has no dependencies.
My questions:
- What version(s) of
RandomJsonLibrary
will be loaded at runtime? - What happens if
RandomJsonLibrary
2.0.0 has a completely different API thanRandomJsonLibrary
1.0.0? - Can the author of
MyWebsite
do anything to fix problems that arise from having multiple versions ofRandomJsonLibrary
in the dependency tree? Is there an equivalent of .NET Framework's binding redirects in .NET 5+?
I'm asking out of curiosity, not because I am encountering a problem. For reference, here is the documentation on Understanding AssemblyLoadContext which seems relevant but did not answer my question.
nearest-wins
rule) – Rianon