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

[ISSUE]: Can't make GitVersion work in conjunction with WiX Toolset 4.0/5.0 #4048

Closed
2 tasks done
professor-k opened this issue May 29, 2024 · 3 comments
Closed
2 tasks done

Comments

@professor-k
Copy link
Contributor

Prerequisites

  • I have written a descriptive issue title
  • 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

  1. Install heatwave extension for Visual Studio
  2. Create a blank WiX Toolset "MSI Package" project,
  3. Add GitVersion.MsBuild v6.0.0-rc.1.
  4. initialize git, commit.
  5. 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

@professor-k
Copy link
Contributor Author

On a sidenote: it looks like besides dropping support to .net 4.8 you are also dropping support of Visual Studio in 6.0 altogether. Are you guys sure about this decision? It's certainly no-go for my team.

@professor-k
Copy link
Contributor Author

<GenerateGitVersionWixDefines>true</GenerateGitVersionWixDefines>
<GenerateGitVersionInformation>false</GenerateGitVersionInformation>
<UpdateAssemblyInfo>false</UpdateAssemblyInfo>

Adding those properties to wixproj makes it work WiX 5.0 / GitVersion.MsBuild 5.12.0

Yet this doesn't answer what to do with GitVersion 6, so I'll leave this issue open.

@arturcic
Copy link
Member

Taking in consideration the team is small and we don't have enough time to support older framework, we had to drop support.

@arturcic arturcic closed this as not planned Won't fix, can't repro, duplicate, stale Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants