Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support generating errors for unresolved assembly conflicts from ResolveAssemblyReference #5934

Closed
dsplaisted opened this issue Dec 4, 2020 · 0 comments · Fixed by #5990
Closed
Labels
needs-triage Have yet to determine what bucket this goes in. Partner request

Comments

@dsplaisted
Copy link
Member

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:

@dsplaisted dsplaisted added the needs-triage Have yet to determine what bucket this goes in. label Dec 4, 2020
Forgind added a commit to Forgind/msbuild that referenced this issue Dec 29, 2020
Forgind added a commit that referenced this issue Jan 8, 2021
Allow users to specify in OutputUnresolvedAssemblyConflicts (an optional parameter to RAR) that they want assembly conflicts provided in an output item and, if true, creates it.

Fixes #5934
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Have yet to determine what bucket this goes in. Partner request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants