Skip to content

Support generating errors for unresolved assembly conflicts from ResolveAssemblyReference #5934

Closed

Description

The Windows CSWinRT API targeting packs are going to be updating regularly. This means that libraries compiled with newer versions of the .NET SDK will have an assembly reference to higher versions of Microsoft.Windows.SDK.NET.dll. If a project that is using an older version of the .NET SDK consumes an updated library (ie via a NuGet package), then there will be an MSB3277 warning from ResolveAssemblyReferences, and a FileLoadException at runtime. (Depending on how types are shared, the build may also fail with a CS1705 compiler error.)

It would be better if an error would be consistently generated at build time that would be more helpful about what the problem is and how to resolve it (usually updating to a newer .NET SDK).

A way to support this could be to update the ResolveAssemblyReference task to optionally generate output items that describe the unresolved assembly conflicts. The .NET SDK would check for any such conflicts for the appropriate DLL and generate an appropriate error message.

Related links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions