-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
See issues dotnet/sdk#1522 and https://github.com/dotnet/corefx/issues/23229.
We're seeing multiple issues where tools in the .NET framework build pipeline attempt to load reference assemblies in an execution context (Assembly.Load, LoadFrom, LoadFile). This fails for assemblies that have the ReferenceAssemblyAttribute.
Build tools should never attempt to load references for execution: they may be running on totally different frameworks / platforms / versions. The problem is that not all tools (especially those for desktop) follow this practice. Largely because before System.Reflection.Metadata we didn't provide a safe way for build tools to do the right thing. They had to use the COM metadata APIs, CCI, LMR, or Cecil.
Given that landscape and our desire to work in as many places as possible, should we remove the ReferenceAssemblyAttribute from any assembly which would apply to desktop?