This question pertains to .NET 5+, not .NET Framework.
Consider the following dependency tree:
MyWebsitehas package references toRandomWebLibrary1.0.0 andRandomJsonLibrary2.0.0.- The NuGet package
RandomWebLibrary1.0.0 has a package reference toRandomJsonLibrary1.0.0. - The NuGet package
RandomJsonLibraryhas no dependencies.
My questions:
- What version(s) of
RandomJsonLibrarywill be loaded at runtime? - What happens if
RandomJsonLibrary2.0.0 has a completely different API thanRandomJsonLibrary1.0.0? - Can the author of
MyWebsitedo anything to fix problems that arise from having multiple versions ofRandomJsonLibraryin 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.
