GitVersion icon indicating copy to clipboard operation
GitVersion copied to clipboard

[Bug] GitVersion produces errors on TFS 2018 and older

Open conmilo opened this issue 3 years ago • 1 comments

Hi,

There is an issue calling GitVersion via command line on Azure DevOps Server (TFS) 2018 and older. Apparently these versions of TFS do not have the capability of setting output variables with the isOutput flag. See also #2426 and https://github.com/microsoft/azure-pipelines-agent/issues/3284

Reproduction Steps

See Using GitVersion with the Command Line build step

Command line task calling dotnet gitversion /output buildserver /nofetch

Error Produced

Unable to process command '##vso[task.setvariable variable=GitVersion.Major;isOutput=true]0' successfully. Please reference documentation (http://go.microsoft.com/fwlink/?LinkId=817296)
Value cannot be null. (Parameter 'RefName')
Unable to process command '##vso[task.setvariable variable=GitVersion.Minor;isOutput=true]1' successfully. Please reference documentation (http://go.microsoft.com/fwlink/?LinkId=817296)
Value cannot be null. (Parameter 'RefName')
Unable to process command '##vso[task.setvariable variable=GitVersion.Patch;isOutput=true]0' successfully. Please reference documentation (http://go.microsoft.com/fwlink/?LinkId=817296)
Value cannot be null. (Parameter 'RefName')

Environment

  • GitVersion 5.8.2+Branch.main.Sha.90dc2bedb08ac54498bddcc279cde5c4596a18d3
  • Team Foundation Server 2017 (15.117.26714.0)

Relevant Line of Code

https://github.com/GitTools/GitVersion/blob/90dc2bedb08ac54498bddcc279cde5c4596a18d3/src/GitVersion.Core/BuildAgents/AzurePipelines.cs#L21

Workaround

Select the Control Option "Continue on error"

conmilo avatar Feb 18 '22 01:02 conmilo

Still applies to GitVersion 5.9.0. Anyone have any thoughts on this?

conmilo avatar Apr 04 '22 17:04 conmilo

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs.

github-actions[bot] avatar Mar 04 '23 10:03 github-actions[bot]

This issue was closed because it has been stalled for 30 days with no activity. Thank you for your contributions

github-actions[bot] avatar Apr 04 '23 11:04 github-actions[bot]