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

Ensure GetBuildVersion runs before Clean #1107

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

MattKotsenas
Copy link
Member

Fixes #1067

This change hooks GetBuildVersion into the Clean target. This is important for scenarios where the build version is part of an output's name, such as when using <GeneratePackageOnBuild>. Otherwise, the build version isn't set and the default version (e.g. 1.0.0) is used, resulting in an incomplete clean.

@MattKotsenas
Copy link
Member Author

I'm new to the project, so I validated that my new test failed before my change and passes after, and that this fix addresses the linked issue. However, please let me know if I used an incorrect test pattern.

Any feedback or suggestions greatly appreciated. Thanks!

Copy link
Collaborator

@AArnott AArnott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thank you!

@AArnott AArnott added this to the v3.7 milestone Oct 17, 2024
@AArnott AArnott merged commit 62dbaa6 into dotnet:main Oct 17, 2024
16 checks passed
@MattKotsenas MattKotsenas deleted the bugfix/1067-rebuild-package branch October 21, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean & Rebuild targets appear to calculate incorrect version when using GeneratePackageOnBuild
2 participants