Skip to content

Conversation

@dorssel
Copy link
Owner

@dorssel dorssel commented Dec 6, 2025

  • Use GitVersion.MsBuild package instead of dotnet-gitversion tool
  • Only activate for WiX projects and building in Visual Studio

@codecov
Copy link

codecov bot commented Dec 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (2f8d0d9) to head (f2e72f5).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #51   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         3    -1     
  Lines          115        36   -79     
  Branches        11         3    -8     
=========================================
- Hits           115        36   -79     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2025

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 4 0 0 0.06s
✅ EDITORCONFIG editorconfig-checker 42 0 0 0.07s
✅ JSON jsonlint 2 0 0 0.21s
✅ JSON prettier 2 0 0 0.52s
✅ JSON v8r 2 0 0 3.37s
✅ MARKDOWN markdownlint 1 0 0 0.78s
✅ MARKDOWN markdown-table-formatter 1 0 0 0.35s
✅ REPOSITORY checkov yes no no 17.11s
✅ REPOSITORY gitleaks yes no no 0.25s
✅ REPOSITORY git_diff yes no no 0.01s
✅ REPOSITORY grype yes no no 30.96s
✅ REPOSITORY secretlint yes no no 1.04s
✅ REPOSITORY syft yes no no 2.11s
✅ REPOSITORY trivy-sbom yes no no 0.29s
✅ REPOSITORY trufflehog yes no no 4.11s
✅ XML xmllint 14 0 0 0.56s
✅ YAML prettier 9 0 0 0.52s
✅ YAML v8r 9 0 0 7.66s
✅ YAML yamllint 9 0 0 0.42s

See detailed reports in MegaLinter artifacts

You could have the same capabilities but better runtime performances if you use a MegaLinter flavor:

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.2.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,EDITORCONFIG_EDITORCONFIG_CHECKER,JSON_JSONLINT,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_GRYPE,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,XML_XMLLINT,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the project to use the GitVersion.MsBuild NuGet package with a UsingTask override approach instead of the dotnet-gitversion tool. The package now serves as an addition to the original GitVersion.MsBuild, specifically for building WiX projects in Visual Studio, rather than a full replacement.

  • Switched from dotnet-gitversion CLI tool to GitVersion.MsBuild package
  • Implemented UsingTask override mechanism to selectively activate only for WiX projects built in Visual Studio
  • Removed GenerateGitVersionInformation functionality and related code
  • Replaced Example C# console app with WiX installer project

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
global.json Added WixToolset.Sdk 6.0.2 to msbuild-sdks
.config/dotnet-tools.json Removed gitversion.tool dependency
Directory.Packages.props Added GitVersion.MsBuild 6.5.1 package version
Directory.Build.props Added GitVersion.MsBuild package reference, removed bootstrapping logic
Directory.Build.targets Removed file (self-reference logic moved to dedicated files)
SelfReference.props New file providing self-reference props for projects in the repo
SelfReference.targets New file providing self-reference targets for projects in the repo
GitVersion.MsBuild/build/Dorssel.GitVersion.MsBuild.props Simplified to only activate for WiX projects in Visual Studio, disabled unsupported features
GitVersion.MsBuild/build/Dorssel.GitVersion.MsBuild.targets Refactored to use UsingTask override with conditional activation
GitVersion.MsBuild/GenerateGitVersionInformation.cs Removed entire file as functionality is no longer supported
UnitTests/UnitTests.csproj Added self-reference imports
UnitTests/TaskTests.cs Removed tests for deleted GenerateGitVersionInformation functionality
gitversion-msbuild.slnx Replaced Example.csproj with Example.wixproj, added self-reference files
Example/Example.csproj Removed C# console application
Example/Example.wixproj New WiX installer project demonstrating GitVersion integration
Example/Package.wxs WiX package definition using GitVersion variables
Example/Package.en-us.wxl WiX localization file
Example/Folders.wxs WiX folder structure definition
Example/ExampleComponents.wxs WiX component group definition
Example/Program.cs Removed C# example code
README.md Updated documentation to reflect new purpose and usage

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dorssel dorssel force-pushed the override branch 2 times, most recently from 75776e8 to 606c9b1 Compare December 6, 2025 22:33
- Use GitVersion.MsBuild package instead of dotnet-gitversion tool
- Only activate for WiX projects *and* building in Visual Studio

+semver: major
@dorssel dorssel merged commit 66677fe into main Dec 7, 2025
9 checks passed
@dorssel dorssel deleted the override branch December 7, 2025 02:15
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.

2 participants