Skip to content

git.properties: stop fallback-file refresh from overriding ProjectReference opt-out - #1725

Open
bart-vmware wants to merge 4 commits into
mainfrom
gitproperties-fix-transitive
Open

git.properties: stop fallback-file refresh from overriding ProjectReference opt-out#1725
bart-vmware wants to merge 4 commits into
mainfrom
gitproperties-fix-transitive

Conversation

@bart-vmware

Copy link
Copy Markdown
Member

Description

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 fails with MSB4057 on any project that doesn't reference this package at all.

Quality checklist

  • Your code complies with our Coding Style.
  • You've updated unit and/or integration tests for your change, where applicable.
  • You've updated documentation for your change, where applicable.
    If your change affects other repositories, such as Documentation and/or Samples, add linked PRs here.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.
  • You've added required license files and/or file headers (explaining where the code came from with proper attribution), where code is copied from StackOverflow, a blog, or OSS.

…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.
@bart-vmware bart-vmware added Component/Management Issues related to Steeltoe Management (actuators) ReleaseLine/4.x Identified as a feature/fix for the 4.x release line labels Aug 5, 2026
@bart-vmware bart-vmware added this to the 4.3.0 milestone Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary - All Code Coverage (ubuntu-latest)

Line coverage Branch coverage

Assembly Line coverage Branch coverage
Steeltoe.Bootstrap.AutoConfiguration 97.4% 83.3%
Steeltoe.Common 86.4% 77%
Steeltoe.Common.Certificates 97.2% 80.2%
Steeltoe.Common.Hosting 83.5% 65%
Steeltoe.Common.Http 97.4% 80.9%
Steeltoe.Common.Logging 81.1% 56.2%
Steeltoe.Common.Net 64.5% 66.6%
Steeltoe.Configuration.Abstractions 96.3% 89.4%
Steeltoe.Configuration.CloudFoundry 98.4% 92.7%
Steeltoe.Configuration.ConfigServer 91.6% 86.2%
Steeltoe.Configuration.Encryption 97.6% 87.8%
Steeltoe.Configuration.Kubernetes.ServiceBindings 95.6% 82.6%
Steeltoe.Configuration.Placeholder 93.8% 82.6%
Steeltoe.Configuration.RandomValue 93.2% 83.3%
Steeltoe.Configuration.SpringBoot 98.3% 85%
Steeltoe.Connectors 94.5% 85.6%
Steeltoe.Connectors.EntityFrameworkCore 79.7% 65.3%
Steeltoe.Discovery.Configuration 96.3% 75%
Steeltoe.Discovery.Consul 91.5% 84%
Steeltoe.Discovery.Eureka 91.6% 81.3%
Steeltoe.Discovery.HttpClients 89.9% 91.4%
Steeltoe.Logging.Abstractions 99.4% 95.6%
Steeltoe.Logging.DynamicConsole 100% 92.3%
Steeltoe.Logging.DynamicSerilog 99.1% 95.4%
Steeltoe.Management.Abstractions 100% 100%
Steeltoe.Management.Endpoint 96% 87.1%
Steeltoe.Management.GitProperties.Build 95.1% 83.9%
Steeltoe.Management.Prometheus 95.8% 76.9%
Steeltoe.Management.Tasks 95.2% 80%
Steeltoe.Management.Tracing 100% 75%
Steeltoe.Security.Authentication.JwtBearer 100% 93.7%
Steeltoe.Security.Authentication.OpenIdConnect 87.7% 66.6%
Steeltoe.Security.Authorization.Certificate 95.6% 61.5%
Steeltoe.Security.DataProtection.Redis 100% ****

@bart-vmware
bart-vmware marked this pull request as ready for review August 5, 2026 13:02
@bart-vmware
bart-vmware requested a review from TimHess August 5, 2026 13:03
TimHess
TimHess previously approved these changes Aug 5, 2026

@TimHess TimHess left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@bart-vmware
bart-vmware force-pushed the gitproperties-fix-transitive branch from 3910f3d to 7ebe5d4 Compare August 5, 2026 21:28
@bart-vmware
bart-vmware requested a review from TimHess August 5, 2026 21:34
@sonarqubecloud

sonarqubecloud Bot commented Aug 5, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component/Management Issues related to Steeltoe Management (actuators) ReleaseLine/4.x Identified as a feature/fix for the 4.x release line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants