-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Improve the dreaded "MSB3277: warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. " #1712
Comments
💯 |
Dupe of #608. Copying your comments over there. |
What if the diagnostic output shows the warning MSB3277, but doesn't list any conflicts? |
The worst thing about this message is that it seems to be saying that there is a conflict due to the assembly depending on itself. Look:
How f**king useless is that? Amazing that this isn't improved in VS 2022. It's not directly actionable because there is no indication what causes the conflict: our projects do not directly use or reference this DLL, and I can only assume the conflict has something to do with our NuGet packages. Edit: actually it's supposed to be improved because the message begins by saying 'Found conflicts between different versions of "Microsoft.EntityFrameworkCore.Relational"' instead of "Found conflicts between different versions of the same dependent assembly". But in my case "Microsoft.EntityFrameworkCore.Relational" is already mentioned 7 times so I could already tell that the warning is somehow related to "Microsoft.EntityFrameworkCore.Relational". |
This error message has been the bane of .NET developers for years. Having worked on assembly resolution for ~6 years in the BCL team, I've diagnosed so many of these warnings for customers, and there's three issues that I see with it:
Developers don't know what this message means.
Developers once they know what it means, don't know how to fix it.
The warning is not actionable without building again with diagnostic build (if you can figure out how to do that). Even then you need to search for the issue in the log, and find the relevant portions.
Here's a typical log:
Note the warning states:
But really the relevant portion is 1#:
and 2#
We should promote 1# or something like it as the root message, and 2# as a nested message under the warning. VS will now hide by default messages that too long or contain multiple lines, and let the user expand to see more detail.
The text was updated successfully, but these errors were encountered: