Skip to content

Should we stop using reference assemblies on desktop? #23309

@ericstj

Description

@ericstj

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?

/cc @nguerrera @weshaggard @jkotas

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions