GitVersion
GitVersion copied to clipboard
[ISSUE]: Can't make GitVersion work in conjunction with WiX Toolset 4.0/5.0
Prerequisites
- [X] I have written a descriptive issue title
- [X] I have searched issues to ensure it has not already been reported
GitVersion package
GitVersion.MsBuild
GitVersion version
6.0.0-rc.1
Operating system
Windows
What are you seeing?
We have GitVersion 5.* working with WiX 3.* for quite a while already. Now we are migrating to WiX 5, and one of the things that is blocking this migration is GitVersion. It looks like a lot of changed on the WiX side, i.e. switch to SDK projects, yet DefineConstants property used by GitVersion for integration is still there. I tried a lot of options to get it work. 5.12.0 doesn't like language which is now set to "wix". It looks like it was handled in 6.*, however when run from Visual Studio GitVersion calculates DisableGitVersionTask to true (because MSBuildRuntimeType is not "Core"). When run from console with "dotnet build", it crashes attempting to launch gitversion.dll, because $(TargetFramework) is "native" in the context of WiX, and there is no folder "native" in the GitVersion.MsBuild package.
What is expected?
After GitVersion.MsBuild package added to WiX 5.0 project, and GenerateGitVersionWixDefines is set to true, GitVersion_* variables are available from WiX code.
Steps to Reproduce
- Install heatwave extension for Visual Studio
- Create a blank WiX Toolset "MSI Package" project,
- Add GitVersion.MsBuild v6.0.0-rc.1.
- initialize git, commit.
- Try building with "dotnet build".
Alternatively, you can clone this repo and go straight to step 5: https://github.com/professor-k/wix_gv
RepositoryFixture Test
No response
Output log or link to your CI build (if appropriate).
No response