msbuild
msbuild copied to clipboard
Deduplicate list of assemblies loaded in TypeLoader
Fixes #7920
Context
When a task ships MSBuild assemblies, we try to load both those assemblies and the assemblies next to MSBuild. This confuses the MetadataLoadContext. We should just use the MSBuild that's actually building, since we'll binding redirect to that anyway.
We also load MSBuild from the runtime, but that one isn't problematic here.
Changes Made
Load MSBuild from one place only in TypeLoader.