git.properties: stop fallback-file refresh from overriding ProjectReference opt-out - #1725
Open
bart-vmware wants to merge 4 commits into
Open
git.properties: stop fallback-file refresh from overriding ProjectReference opt-out#1725bart-vmware wants to merge 4 commits into
bart-vmware wants to merge 4 commits into
Conversation
…erence opt-out WriteGitPropertiesFallbackFile forced GenerateGitProperties=true as a global MSBuild property, which propagates to every ProjectReference by default and silently overrode a referenced project's own opt-out (e.g. a shared ServiceDefaults project with GenerateGitProperties=false), generating a fallback file it explicitly didn't want. Removing the forced property lets each project's own auto/true/false decision stand for itself and for anything referencing it. Also documents and tests the Directory.Build.targets wrapper needed to safely refresh git.properties across a whole solution, since calling the target directly still fails with MSB4057 on any project that doesn't reference this package at all.
Contributor
Summary - All Code Coverage (ubuntu-latest)
|
bart-vmware
marked this pull request as ready for review
August 5, 2026 13:02
TimHess
reviewed
Aug 5, 2026
bart-vmware
force-pushed
the
gitproperties-fix-transitive
branch
from
August 5, 2026 21:28
3910f3d to
7ebe5d4
Compare
TimHess
approved these changes
Aug 5, 2026
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
WriteGitPropertiesFallbackFileforcedGenerateGitProperties=trueas a global MSBuild property, which propagates to everyProjectReferenceby default and silently overrode a referenced project's own opt-out (e.g. a shared ServiceDefaults project withGenerateGitProperties=false), generating a fallback file it explicitly didn't want. Removing the forced property lets each project's ownauto/true/falsedecision stand for itself and for anything referencing it.Also documents and tests the
Directory.Build.targetswrapper needed to safely refreshgit.propertiesacross a whole solution, since calling the target directly fails with MSB4057 on any project that doesn't reference this package at all.Quality checklist
If your change affects other repositories, such as Documentation and/or Samples, add linked PRs here.