-
Notifications
You must be signed in to change notification settings - Fork 652
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
[Docs] MSBuild task missing info on workaround regarding duplicate AssemblyVersionAttributes in WPF projects #2614
Comments
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions. |
@inkahootz : the issue is relevant. It is a bit disappointing, that no one from the project would look into it. |
Sorry for not responding until now. I think @inkahootz' proposal of adding information to the documentation is a good one and would accept a PR for that. |
However, please see #2841 that already added some related information. A PR expanding on that should take the existing information into account. |
I will investigate the interaction between the I do feel there is some room for documentation since net5.0 is still the current release, so there will probably be a PR. |
@asbjornu LMK if I need to trim off the last commit and open a separate issue for that. I did my best to verify that the change works back to .NET Core 3.1 with resource URI's showing the correct version. Thanks for reopening the issue by the way! Just glad we can get it fixed 👍 |
🎉 This issue has been resolved in version 5.8.0 🎉 Your GitReleaseManager bot 📦🚀 |
I ran into this problem today but there is already a workaround in place with the .NET Core 5.0.200 SDK.
Prereqs:
Minimal repro:
net5wpf_gitversionbug.zip
or make the repro yourself
You should get a few errors regarding duplicate attributes. WPF temporary projects don't properly import package reference props and targets. This leads to the temporary project making it's own AssemblyInfo.cs file it thinks it hasn't been generated yet.
In actuality, a second one is then generated and CSC picks up both during the CoreCompile target of the temp assembly... leading to this!
If you specify a new property (
IncludePackageReferencesDuringMarkupCompliation
) that was put in in the 5.0.200 release, you can build successfully.dotnet build -p:IncludePackageReferencesDuringMarkupCompilation=true
I hope this seems appropriate to file an issue here.
Is the best place to put this info in ~docs/input/docs/usage/msbuild.md? If so, I can contribute and submit a PR to help guide people if they run into this error as that flag is not well documented.
If it's of no concern to gitversion, I can close the issue 😄
It should go away with .NET6 as the flag will be enabled by default.
Thanks!
The text was updated successfully, but these errors were encountered: