-
Notifications
You must be signed in to change notification settings - Fork 663
Closed
Description
Hello,
I have a C# project that uses the GitVersionTask package. The project is built in an Azure DevOps pipeline. When running the build, the Azure DevOps build number is automatically set to the "FullSemVer". However, after upgrading GitVersionTask to GitVersion.MsBuild, the build number is not set anymore.
Expected Behavior
GitVersion.MsBuild should set the Azure DevOps build number.
Actual Behavior
GitVersion.MsBuild does not set the Azure DevOps build number.
Additional Information
The log shows the following line:
Executing GenerateBuildLogOutput for 'AzurePipelines'.
However, it does not show this line:
Executing GenerateSetVersionMessage for 'AzurePipelines'.
From the git version code (src/GitVersionCore/Core/BuildAgentBase.cs), this indicates that the updateBuildNumber variable is false:
if (updateBuildNumber)
{
writer($"Executing GenerateSetVersionMessage for '{GetType().Name}'.");
writer(GenerateSetVersionMessage(variables));
}
writer($"Executing GenerateBuildLogOutput for '{GetType().Name}'.");
I tried adding a GitVersion.yml with update-build-number: true, however, it did not help.
Your Environment
- Azure DevOps pipeline.
- Repository does not contain
GitVersion.yml. If I rungitversion /showconfiglocally,update-build-numberis set totrue. - GitVersion.MsBuild 5.6.4
HaGGi13, lucaritossa, paulcustance-al, yggdrasil-tynor, sevenate and 8 more