Description
Describe the bug
TL;DR: The "GenerateGitVersionInformation" task was not given a value for the required parameter "Language".
Previously I was using GitVersion.Task
package in my WIX setup projects to help version my installers. I would access environment variables to set the installer product version, then I would use the following target to name the output file:
<Target Name="BeforeBuild" AfterTargets="GetVersion">
<CreateProperty Value="$(OutputName).$(GitVersion_SemVer)">
<Output TaskParameter="Value" PropertyName="TargetName" />
</CreateProperty>
<CreateProperty Value="$(TargetName)$(TargetExt)">
<Output TaskParameter="Value" PropertyName="TargetFileName" />
</CreateProperty>
<CreateProperty Value="$(TargetDir)$(TargetFileName)">
<Output TaskParameter="Value" PropertyName="TargetPath" />
</CreateProperty>
</Target>
I noticed that the GitVersion.Task
package was marked Deprecated so I migrated to the replacement, GitVersion.MSBuild
. However, this no longer works. When I build my installer, I get the following error:
0>D:\VS-Projects\TA.NexDome.AscomServer\packages\GitVersion.MsBuild.5.6.1\tools\net48/gitversion.exe D:\VS-Projects\TA.NexDome.AscomServer\TA.NexDome.Bootstrapper -output file -outputfile D:\VS-Projects\TA.NexDome.AscomServer\TA.NexDome.Bootstrapper/gitversion.json 0>D:\VS-Projects\TA.NexDome.AscomServer\packages\GitVersion.MsBuild.5.6.1\tools\GitVersion.MsBuild.targets(110,9): Error MSB4044: The "GenerateGitVersionInformation" task was not given a value for the required parameter "Language". 0>------- Finished building project: TA.NexDome.Bootstrapper. Succeeded: False. Errors: 1. Warnings: 0 Build completed in 00:00:04.008
Expected Behavior
I expected the new package to behave the same as the old one, since there should not have been any breaking changes.
Actual Behavior
New package produces build errors as shown above.
Context
The GitVersion.MSBuild
package does not behave the same as the deprecated GitVersion.Task
package and this would appear to be an unintentional breaking change. I can't build my project with the new package so I'm forced to use the deprecated package.
Your Environment
WIX Bootstrapper project using WIX Toolset 3.11, building in Visual Studio 2019.
- GitVersion.MSBuild 5.6.1
- Windows 10,
- Link to project: https://github.com/nexdome/ASCOM