Gitversion: Version 5.2.0 broken in Azure DevOps

Created on 9 Mar 2020  路  31Comments  路  Source: GitTools/GitVersion

My build pipeline didn't work this morning and I noticed that GitVersion 5.2.0 was picked up, it appears that the variable setting is not being propagated between tasks as my script to assign the DevOps BuildId, can't find $(GitVersion.NuGetVersionV2), although it does seem to be assigned according to the logs...

# Update the reported build number to include semantic version and the numeric build id
- bash: |
    echo "##vso[build.updatebuildnumber]$(GitVersion.NugetVersionV2)-$(Build.BuildId)"
  displayName: 'Update build number'

Only differential I can find it GitVersion version

5.2.0 Build logs

GitVersion Task

2020-03-09T09:07:18.3991059Z ##[debug]Evaluating condition for step: 'GitVersion'
2020-03-09T09:07:18.3992815Z ##[debug]Evaluating: SucceededNode()
2020-03-09T09:07:18.3993545Z ##[debug]Evaluating SucceededNode:
2020-03-09T09:07:18.3994712Z ##[debug]=> True
2020-03-09T09:07:18.3995291Z ##[debug]Result: True
2020-03-09T09:07:18.3995855Z ##[section]Starting: GitVersion
2020-03-09T09:07:18.4002740Z ==============================================================================
2020-03-09T09:07:18.4003356Z Task         : GitVersion Task
2020-03-09T09:07:18.4003910Z Description  : Easy Semantic Versioning (http://semver.org) for projects using Git
2020-03-09T09:07:18.4004228Z Version      : 5.1.2
2020-03-09T09:07:18.4004491Z Author       : GitVersion Contributors
2020-03-09T09:07:18.4004880Z Help         : See the [documentation](http://gitversion.readthedocs.org/en/latest/) for help
2020-03-09T09:07:18.4005930Z ==============================================================================
2020-03-09T09:07:18.7607604Z ##[debug]agent.TempDirectory=/home/vsts/work/_temp
2020-03-09T09:07:18.7629555Z ##[debug]loading inputs and endpoints
2020-03-09T09:07:18.7633613Z ##[debug]loading INPUT_VERSIONSPEC
2020-03-09T09:07:18.7644782Z ##[debug]loading INPUT_INCLUDEPRERELEASE
2020-03-09T09:07:18.7648244Z ##[debug]loading INPUT_USECONFIGFILE
2020-03-09T09:07:18.7649894Z ##[debug]loading INPUT_CONFIGFILEPATH
2020-03-09T09:07:18.7651732Z ##[debug]loading INPUT_UPDATEASSEMBLYINFO
2020-03-09T09:07:18.7654216Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2020-03-09T09:07:18.7655791Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2020-03-09T09:07:18.7657947Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2020-03-09T09:07:18.7663444Z ##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
2020-03-09T09:07:18.7665779Z ##[debug]loaded 9
2020-03-09T09:07:18.7680956Z ##[debug]Agent.ProxyUrl=undefined
2020-03-09T09:07:18.7682028Z ##[debug]Agent.CAInfo=undefined
2020-03-09T09:07:18.7682357Z ##[debug]Agent.ClientCert=undefined
2020-03-09T09:07:18.7683697Z ##[debug]Agent.SkipCertValidation=undefined
2020-03-09T09:07:18.7871566Z ##[debug]Agent.ProxyUrl=undefined
2020-03-09T09:07:18.7872376Z ##[debug]Agent.CAInfo=undefined
2020-03-09T09:07:18.7872964Z ##[debug]Agent.ClientCert=undefined
2020-03-09T09:07:18.7878130Z ##[debug]check path : /home/vsts/work/_tasks/UseGitVersion_bab30d5c-39f3-49b0-a7db-9a5da6676eaa/5.1.2/node_modules/azure-pipelines-tool-lib/lib.json
2020-03-09T09:07:18.7879560Z ##[debug]adding resource file: /home/vsts/work/_tasks/UseGitVersion_bab30d5c-39f3-49b0-a7db-9a5da6676eaa/5.1.2/node_modules/azure-pipelines-tool-lib/lib.json
2020-03-09T09:07:18.7880159Z ##[debug]system.culture=en-US
2020-03-09T09:07:18.7894299Z ##[debug]versionSpec=5.x
2020-03-09T09:07:18.7898308Z ##[debug]includePrerelease=false
2020-03-09T09:07:18.7899207Z ##[debug]targetPath=null
2020-03-09T09:07:18.7900813Z ##[debug]useConfigFile=true
2020-03-09T09:07:18.7901185Z ##[debug]configFilePath=/home/vsts/work/1/s/gitversion.yml
2020-03-09T09:07:18.7901729Z ##[debug]updateAssemblyInfo=false
2020-03-09T09:07:18.7902036Z ##[debug]updateAssemblyInfoFilename=null
2020-03-09T09:07:18.7902352Z ##[debug]additionalArguments=null
2020-03-09T09:07:18.7902680Z ##[debug]Build.SourcesDirectory=/home/vsts/work/1/s
2020-03-09T09:07:18.7914240Z ##[debug]INSTALL_TOOL=undefined
2020-03-09T09:07:18.7933969Z 
2020-03-09T09:07:18.7934568Z --------------------------
2020-03-09T09:07:18.7934830Z Installing GitVersion.Tool version 5.x
2020-03-09T09:07:18.7937054Z --------------------------
2020-03-09T09:07:18.7937760Z ##[debug]isExplicit: null
2020-03-09T09:07:18.7939083Z ##[debug]explicit? false
2020-03-09T09:07:18.7939672Z ##[debug]isExplicit: null
2020-03-09T09:07:18.7939967Z ##[debug]explicit? false
2020-03-09T09:07:18.7942031Z ##[debug]Agent.Version=2.165.0
2020-03-09T09:07:18.7942346Z ##[debug]Agent.ToolsDirectory=/opt/hostedtoolcache
2020-03-09T09:07:18.7944128Z ##[debug]evaluating 0 versions
2020-03-09T09:07:18.7944448Z ##[debug]match not found
2020-03-09T09:07:18.7944770Z ##[debug]isExplicit: null
2020-03-09T09:07:18.7945278Z ##[debug]explicit? false
2020-03-09T09:07:18.7947431Z ##[debug]querying tool versions for [email protected] 
2020-03-09T09:07:19.5231433Z ##[debug]got versions: 5.0.0, 5.0.1, 5.1.0, 5.1.1, 5.1.2, 5.1.3, 5.2.0
2020-03-09T09:07:19.5232418Z ##[debug]evaluating 7 versions
2020-03-09T09:07:19.5271962Z ##[debug]matched: 5.2.0
2020-03-09T09:07:19.5273329Z ##[debug]isExplicit: 5.2.0
2020-03-09T09:07:19.5275452Z ##[debug]explicit? true
2020-03-09T09:07:19.5276481Z ##[debug]Agent.Version=2.165.0
2020-03-09T09:07:19.5277403Z ##[debug]Agent.ToolsDirectory=/opt/hostedtoolcache
2020-03-09T09:07:19.5278065Z ##[debug]checking cache: /opt/hostedtoolcache/GitVersion.Tool/5.2.0/x64
2020-03-09T09:07:19.5288576Z ##[debug]not found
2020-03-09T09:07:19.5289826Z ##[debug]which 'dotnet'
2020-03-09T09:07:19.5290663Z ##[debug]found: '/usr/bin/dotnet'
2020-03-09T09:07:19.5291433Z ##[debug]which 'dotnet'
2020-03-09T09:07:19.5292247Z ##[debug]found: '/usr/bin/dotnet'
2020-03-09T09:07:19.5292956Z ##[debug]Agent.TempDirectory=/home/vsts/work/_temp
2020-03-09T09:07:19.5294716Z ##[debug]cleaning: 5.2.0
2020-03-09T09:07:19.5296645Z ##[debug]/usr/bin/dotnet arg: ["tool","install","GitVersion.Tool","--tool-path","/home/vsts/work/_temp","--version","5.2.0"]
2020-03-09T09:07:19.5300247Z ##[debug]exec tool: /usr/bin/dotnet
2020-03-09T09:07:19.5300605Z ##[debug]arguments:
2020-03-09T09:07:19.5300915Z ##[debug]   tool
2020-03-09T09:07:19.5301216Z ##[debug]   install
2020-03-09T09:07:19.5301538Z ##[debug]   GitVersion.Tool
2020-03-09T09:07:19.5302057Z ##[debug]   --tool-path
2020-03-09T09:07:19.5303066Z ##[debug]   /home/vsts/work/_temp
2020-03-09T09:07:19.5303816Z ##[debug]   --version
2020-03-09T09:07:19.5304154Z ##[debug]   5.2.0
2020-03-09T09:07:19.5304802Z [command]/usr/bin/dotnet tool install GitVersion.Tool --tool-path /home/vsts/work/_temp --version 5.2.0
2020-03-09T09:07:23.3090230Z 
2020-03-09T09:07:23.3090896Z Welcome to .NET Core 3.1!
2020-03-09T09:07:23.3091851Z ---------------------
2020-03-09T09:07:23.3092096Z SDK Version: 3.1.101
2020-03-09T09:07:23.3092270Z 
2020-03-09T09:07:23.3092419Z Telemetry
2020-03-09T09:07:23.3092756Z ---------
2020-03-09T09:07:23.3093874Z The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
2020-03-09T09:07:23.3094532Z 
2020-03-09T09:07:23.3095041Z Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
2020-03-09T09:07:23.3095321Z 
2020-03-09T09:07:23.3095637Z ----------------
2020-03-09T09:07:23.3096119Z Explore documentation: https://aka.ms/dotnet-docs
2020-03-09T09:07:23.3096517Z Report issues and find source on GitHub: https://github.com/dotnet/core
2020-03-09T09:07:23.3097048Z Find out what's new: https://aka.ms/dotnet-whats-new
2020-03-09T09:07:23.3097891Z Learn about the installed HTTPS developer cert: https://aka.ms/aspnet-core-https
2020-03-09T09:07:23.3098554Z Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs
2020-03-09T09:07:23.3099143Z Write your first app: https://aka.ms/first-net-core-app
2020-03-09T09:07:23.3099994Z --------------------------------------------------------------------------------------
2020-03-09T09:07:23.3100613Z You can invoke the tool using the following command: dotnet-gitversion
2020-03-09T09:07:23.3101192Z Tool 'gitversion.tool' (version '5.2.0') was successfully installed.
2020-03-09T09:07:23.3101763Z ##[debug]tool install result: success 
2020-03-09T09:07:23.3127830Z Caching tool: GitVersion.Tool 5.2.0 x64
2020-03-09T09:07:23.3128488Z ##[debug]source dir: /home/vsts/work/_temp
2020-03-09T09:07:23.3129958Z ##[debug]Agent.Version=2.165.0
2020-03-09T09:07:23.3130534Z ##[debug]Agent.ToolsDirectory=/opt/hostedtoolcache
2020-03-09T09:07:23.3131090Z ##[debug]destination /opt/hostedtoolcache/GitVersion.Tool/5.2.0/x64
2020-03-09T09:07:23.3132725Z ##[debug]rm -rf /opt/hostedtoolcache/GitVersion.Tool/5.2.0/x64
2020-03-09T09:07:23.3133974Z ##[debug]rm -rf /opt/hostedtoolcache/GitVersion.Tool/5.2.0/x64.complete
2020-03-09T09:07:23.3138337Z ##[debug]testing directory '/opt/hostedtoolcache/GitVersion.Tool/5.2.0/x64'
2020-03-09T09:07:23.3139192Z ##[debug]testing directory '/opt/hostedtoolcache/GitVersion.Tool/5.2.0'
2020-03-09T09:07:23.3140457Z ##[debug]testing directory '/opt/hostedtoolcache/GitVersion.Tool'
2020-03-09T09:07:23.3141003Z ##[debug]testing directory '/opt/hostedtoolcache'
2020-03-09T09:07:23.3141830Z ##[debug]mkdir '/opt/hostedtoolcache/GitVersion.Tool'
2020-03-09T09:07:23.3178057Z ##[debug]mkdir '/opt/hostedtoolcache/GitVersion.Tool/5.2.0'
2020-03-09T09:07:23.3182493Z ##[debug]mkdir '/opt/hostedtoolcache/GitVersion.Tool/5.2.0/x64'
2020-03-09T09:07:23.4313552Z ##[debug]Agent.Version=2.165.0
2020-03-09T09:07:23.4314092Z ##[debug]Agent.ToolsDirectory=/opt/hostedtoolcache
2020-03-09T09:07:23.4314528Z ##[debug]finished caching tool
2020-03-09T09:07:23.4315422Z ##[debug]toolPath: /opt/hostedtoolcache/GitVersion.Tool/5.2.0/x64
2020-03-09T09:07:23.4316879Z ##[debug]which 'dotnet'
2020-03-09T09:07:23.4317939Z ##[debug]found: '/usr/bin/dotnet'
2020-03-09T09:07:23.4321765Z ##[debug]set DOTNET_ROOT=../share/dotnet
2020-03-09T09:07:23.4343077Z ##[debug]Processed: ##vso[task.setvariable variable=DOTNET_ROOT;issecret=false;]../share/dotnet
2020-03-09T09:07:23.4343697Z ##[debug]Agent.Version=2.165.0
2020-03-09T09:07:23.4346227Z Prepending PATH environment variable with directory: /opt/hostedtoolcache/GitVersion.Tool/5.2.0/x64
2020-03-09T09:07:23.4347655Z ##[debug]new Path: /opt/hostedtoolcache/GitVersion.Tool/5.2.0/x64:/usr/share/rust/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
2020-03-09T09:07:23.4352780Z ##[debug]Processed: ##vso[task.prependpath]/opt/hostedtoolcache/GitVersion.Tool/5.2.0/x64
2020-03-09T09:07:23.4353706Z ##[debug]which 'dotnet-gitversion'
2020-03-09T09:07:23.4354484Z ##[debug]found: '/opt/hostedtoolcache/GitVersion.Tool/5.2.0/x64/dotnet-gitversion'
2020-03-09T09:07:23.4355095Z ##[debug]which 'dotnet-gitversion'
2020-03-09T09:07:23.4355831Z ##[debug]found: '/opt/hostedtoolcache/GitVersion.Tool/5.2.0/x64/dotnet-gitversion'
2020-03-09T09:07:23.4356607Z ##[debug]/opt/hostedtoolcache/GitVersion.Tool/5.2.0/x64/dotnet-gitversion arg: ["/home/vsts/work/1/s","/output","buildserver","/nofetch"]
2020-03-09T09:07:23.4357216Z ##[debug]configFilePath=/home/vsts/work/1/s/gitversion.yml
2020-03-09T09:07:23.4357822Z ##[debug]Absolute path for pathSegments: /home/vsts/work/1/s/gitversion.yml = /home/vsts/work/1/s/gitversion.yml
2020-03-09T09:07:23.4373206Z ##[debug]build.sourcesDirectory=/home/vsts/work/1/s
2020-03-09T09:07:23.4373861Z ##[debug]Absolute path for pathSegments: /home/vsts/work/1/s = /home/vsts/work/1/s
2020-03-09T09:07:23.4374377Z ##[debug]configFilePathpath supplied :true
2020-03-09T09:07:23.4375239Z ##[debug]/opt/hostedtoolcache/GitVersion.Tool/5.2.0/x64/dotnet-gitversion arg: ["/config","/home/vsts/work/1/s/gitversion.yml"]
2020-03-09T09:07:23.4376695Z ##[debug]exec tool: /opt/hostedtoolcache/GitVersion.Tool/5.2.0/x64/dotnet-gitversion
2020-03-09T09:07:23.4377126Z ##[debug]arguments:
2020-03-09T09:07:23.4377487Z ##[debug]   /home/vsts/work/1/s
2020-03-09T09:07:23.4377805Z ##[debug]   /output
2020-03-09T09:07:23.4378094Z ##[debug]   buildserver
2020-03-09T09:07:23.4378395Z ##[debug]   /nofetch
2020-03-09T09:07:23.4378690Z ##[debug]   /config
2020-03-09T09:07:23.4379032Z ##[debug]   /home/vsts/work/1/s/gitversion.yml
2020-03-09T09:07:23.4380131Z [command]/opt/hostedtoolcache/GitVersion.Tool/5.2.0/x64/dotnet-gitversion /home/vsts/work/1/s /output buildserver /nofetch /config /home/vsts/work/1/s/gitversion.yml
2020-03-09T09:07:24.0753049Z   INFO [03/09/20 9:07:24:07] Begin: Creating dictionary
2020-03-09T09:07:24.0795081Z   INFO [03/09/20 9:07:24:07] End: Creating dictionary (Took: 5.76ms)
2020-03-09T09:07:24.0827345Z   INFO [03/09/20 9:07:24:08] Begin: Storing version variables to cache file /home/vsts/work/1/s/.git/gitversion_cache/3B11F9BAC0735844DB13C6C3EA93752CCA8B0644.yml
2020-03-09T09:07:24.1241438Z   INFO [03/09/20 9:07:24:12] End: Storing version variables to cache file /home/vsts/work/1/s/.git/gitversion_cache/3B11F9BAC0735844DB13C6C3EA93752CCA8B0644.yml (Took: 41.43ms)
2020-03-09T09:07:24.1244924Z   INFO [03/09/20 9:07:24:12] Applicable build agent found: 'AzurePipelines'.
2020-03-09T09:07:24.1277430Z Executing GenerateSetVersionMessage for 'AzurePipelines'.
2020-03-09T09:07:24.1289525Z ##[debug]Update build number for build: 202218 to: 0.5.0 at backend.
2020-03-09T09:07:24.2245964Z ##[debug]Processed: ##vso[build.updatebuildnumber]0.5.0
2020-03-09T09:07:24.2246946Z Executing GenerateBuildLogOutput for 'AzurePipelines'.
2020-03-09T09:07:24.2256901Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.Major;isOutput=true]0
2020-03-09T09:07:24.2258322Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.Minor;isOutput=true]5
2020-03-09T09:07:24.2259633Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.Patch;isOutput=true]0
2020-03-09T09:07:24.2260948Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.PreReleaseTag;isOutput=true].68
2020-03-09T09:07:24.2262665Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.PreReleaseTagWithDash;isOutput=true]
2020-03-09T09:07:24.2264451Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.PreReleaseLabel;isOutput=true]
2020-03-09T09:07:24.2266079Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.PreReleaseNumber;isOutput=true]
2020-03-09T09:07:24.2267499Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.WeightedPreReleaseNumber;isOutput=true]
2020-03-09T09:07:24.2268836Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.BuildMetaData;isOutput=true]
2020-03-09T09:07:24.2270274Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.BuildMetaDataPadded;isOutput=true]
2020-03-09T09:07:24.2271715Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.FullBuildMetaData;isOutput=true]Branch.master.Sha.2a8f545c7f7708e6fe8ebca1afc297c8586727cb
2020-03-09T09:07:24.2273089Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.MajorMinorPatch;isOutput=true]0.5.0
2020-03-09T09:07:24.2275440Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.SemVer;isOutput=true]0.5.0
2020-03-09T09:07:24.2276782Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.LegacySemVer;isOutput=true]0.5.0
2020-03-09T09:07:24.2278070Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.LegacySemVerPadded;isOutput=true]0.5.0
2020-03-09T09:07:24.2279369Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.AssemblySemVer;isOutput=true]0.5.0.0
2020-03-09T09:07:24.2280594Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.AssemblySemFileVer;isOutput=true]0.5.0.0
2020-03-09T09:07:24.2281894Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.FullSemVer;isOutput=true]0.5.0
2020-03-09T09:07:24.2283543Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.InformationalVersion;isOutput=true]0.5.0.0-2a8f545
2020-03-09T09:07:24.2284847Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.BranchName;isOutput=true]master
2020-03-09T09:07:24.2377417Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.EscapedBranchName;isOutput=true]master
2020-03-09T09:07:24.2378893Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.Sha;isOutput=true]2a8f545c7f7708e6fe8ebca1afc297c8586727cb
2020-03-09T09:07:24.2380483Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.ShortSha;isOutput=true]2a8f545
2020-03-09T09:07:24.2381679Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.NuGetVersionV2;isOutput=true]0.5.0
2020-03-09T09:07:24.2383140Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.NuGetVersion;isOutput=true]0.5.0
2020-03-09T09:07:24.2384276Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.NuGetPreReleaseTagV2;isOutput=true]
2020-03-09T09:07:24.2385587Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.NuGetPreReleaseTag;isOutput=true]
2020-03-09T09:07:24.2387034Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.VersionSourceSha;isOutput=true]d0fe1510364074c0a91ecda98a2567ef1eda1087
2020-03-09T09:07:24.2388242Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.CommitsSinceVersionSource;isOutput=true]68
2020-03-09T09:07:24.2389570Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.CommitsSinceVersionSourcePadded;isOutput=true]0068
2020-03-09T09:07:24.2391036Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.CommitDate;isOutput=true]2020-03-09
2020-03-09T09:07:24.2391762Z ##[debug]Exit code 0 received from tool '/opt/hostedtoolcache/GitVersion.Tool/5.2.0/x64/dotnet-gitversion'
2020-03-09T09:07:24.2392793Z ##[debug]STDIO streams have closed for tool '/opt/hostedtoolcache/GitVersion.Tool/5.2.0/x64/dotnet-gitversion'
2020-03-09T09:07:24.2393268Z ##[debug]task result: Succeeded
2020-03-09T09:07:24.2400490Z ##[debug]Processed: ##vso[task.complete result=Succeeded;]GitVersion executed successfully
2020-03-09T09:07:24.2436919Z ##[section]Async Command Start: Update Build Number
2020-03-09T09:07:24.3859055Z Update build number to 0.5.0 for build 202218
2020-03-09T09:07:24.3859579Z ##[section]Async Command End: Update Build Number
2020-03-09T09:07:24.3861009Z ##[section]Finishing: GitVersion

Assignment Task

2020-03-09T09:07:24.8013509Z ##[debug]Evaluating condition for step: 'Update build number'
2020-03-09T09:07:24.8016642Z ##[debug]Evaluating: SucceededNode()
2020-03-09T09:07:24.8017286Z ##[debug]Evaluating SucceededNode:
2020-03-09T09:07:24.8018899Z ##[debug]=> True
2020-03-09T09:07:24.8020230Z ##[debug]Result: True
2020-03-09T09:07:24.8021320Z ##[section]Starting: Update build number
2020-03-09T09:07:24.8031261Z ==============================================================================
2020-03-09T09:07:24.8031841Z Task         : Bash
2020-03-09T09:07:24.8032137Z Description  : Run a Bash script on macOS, Linux, or Windows
2020-03-09T09:07:24.8032440Z Version      : 3.163.1
2020-03-09T09:07:24.8032697Z Author       : Microsoft Corporation
2020-03-09T09:07:24.8033093Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/bash
2020-03-09T09:07:24.8033890Z ==============================================================================
2020-03-09T09:07:24.9261148Z ##[debug]agent.TempDirectory=/home/vsts/work/_temp
2020-03-09T09:07:24.9288567Z ##[debug]loading inputs and endpoints
2020-03-09T09:07:24.9292291Z ##[debug]loading INPUT_TARGETTYPE
2020-03-09T09:07:24.9301704Z ##[debug]loading INPUT_FILEPATH
2020-03-09T09:07:24.9304803Z ##[debug]loading INPUT_SCRIPT
2020-03-09T09:07:24.9305902Z ##[debug]loading INPUT_WORKINGDIRECTORY
2020-03-09T09:07:24.9306684Z ##[debug]loading INPUT_FAILONSTDERR
2020-03-09T09:07:24.9307628Z ##[debug]loading INPUT_NOPROFILE
2020-03-09T09:07:24.9308504Z ##[debug]loading INPUT_NORC
2020-03-09T09:07:24.9309316Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2020-03-09T09:07:24.9310857Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2020-03-09T09:07:24.9311811Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2020-03-09T09:07:24.9317824Z ##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
2020-03-09T09:07:24.9321238Z ##[debug]loaded 11
2020-03-09T09:07:24.9341372Z ##[debug]Agent.ProxyUrl=undefined
2020-03-09T09:07:24.9342094Z ##[debug]Agent.CAInfo=undefined
2020-03-09T09:07:24.9342768Z ##[debug]Agent.ClientCert=undefined
2020-03-09T09:07:24.9343265Z ##[debug]Agent.SkipCertValidation=undefined
2020-03-09T09:07:24.9362296Z ##[debug]noProfile=true
2020-03-09T09:07:24.9366631Z ##[debug]noRc=true
2020-03-09T09:07:24.9381911Z ##[debug]check path : /home/vsts/work/_tasks/Bash_6c731c3c-3c68-459a-a5c9-bde6e6595b5b/3.163.1/task.json
2020-03-09T09:07:24.9382919Z ##[debug]adding resource file: /home/vsts/work/_tasks/Bash_6c731c3c-3c68-459a-a5c9-bde6e6595b5b/3.163.1/task.json
2020-03-09T09:07:24.9384958Z ##[debug]system.culture=en-US
2020-03-09T09:07:24.9396159Z ##[debug]failOnStderr=false
2020-03-09T09:07:24.9397257Z ##[debug]workingDirectory=/home/vsts/work/1/s
2020-03-09T09:07:24.9398225Z ##[debug]check path : /home/vsts/work/1/s
2020-03-09T09:07:24.9398684Z ##[debug]targetType=inline
2020-03-09T09:07:24.9400938Z ##[debug]script=echo "##vso[build.updatebuildnumber]$(GitVersion.NugetVersionV2)-202218"
2020-03-09T09:07:24.9438276Z Generating script.
2020-03-09T09:07:24.9441190Z ##[debug]which 'bash'
2020-03-09T09:07:24.9448948Z ##[debug]found: '/bin/bash'
2020-03-09T09:07:24.9449350Z ##[debug]Agent.Version=2.165.0
2020-03-09T09:07:24.9449770Z ##[debug]agent.tempDirectory=/home/vsts/work/_temp
2020-03-09T09:07:24.9450226Z ##[debug]check path : /home/vsts/work/_temp
2020-03-09T09:07:24.9466136Z ========================== Starting Command Output ===========================
2020-03-09T09:07:24.9466935Z ##[debug]which '/bin/bash'
2020-03-09T09:07:24.9467441Z ##[debug]found: '/bin/bash'
2020-03-09T09:07:24.9471600Z ##[debug]/bin/bash arg: --noprofile
2020-03-09T09:07:24.9472107Z ##[debug]/bin/bash arg: --norc
2020-03-09T09:07:24.9472674Z ##[debug]/bin/bash arg: /home/vsts/work/_temp/f5e7e734-4c87-4b62-b9a1-86e878ef80b4.sh
2020-03-09T09:07:24.9477517Z ##[debug]exec tool: /bin/bash
2020-03-09T09:07:24.9477875Z ##[debug]arguments:
2020-03-09T09:07:24.9478375Z ##[debug]   --noprofile
2020-03-09T09:07:24.9478784Z ##[debug]   --norc
2020-03-09T09:07:24.9479280Z ##[debug]   /home/vsts/work/_temp/f5e7e734-4c87-4b62-b9a1-86e878ef80b4.sh
2020-03-09T09:07:24.9482519Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/f5e7e734-4c87-4b62-b9a1-86e878ef80b4.sh
2020-03-09T09:07:24.9546222Z /home/vsts/work/_temp/f5e7e734-4c87-4b62-b9a1-86e878ef80b4.sh: line 1: GitVersion.NugetVersionV2: command not found
2020-03-09T09:07:24.9569004Z ##[debug]Update build number for build: 202218 to: -202218 at backend.
2020-03-09T09:07:24.9988733Z ##[debug]Processed: ##vso[build.updatebuildnumber]-202218
2020-03-09T09:07:24.9989090Z 
2020-03-09T09:07:24.9990167Z ##[debug]Exit code 0 received from tool '/bin/bash'
2020-03-09T09:07:24.9990854Z ##[debug]STDIO streams have closed for tool '/bin/bash'
2020-03-09T09:07:24.9991302Z ##[debug]task result: Succeeded
2020-03-09T09:07:25.0000813Z ##[debug]Processed: ##vso[task.complete result=Succeeded;done=true;]
2020-03-09T09:07:25.0026095Z ##[section]Async Command Start: Update Build Number
2020-03-09T09:07:25.0947385Z Update build number to -202218 for build 202218
2020-03-09T09:07:25.0947796Z ##[section]Async Command End: Update Build Number
2020-03-09T09:07:25.0948967Z ##[section]Finishing: Update build number

5.1.3 Build logs

GitVersion Task

2020-03-09T09:18:43.7984758Z ##[debug]Evaluating condition for step: 'GitVersion'
2020-03-09T09:18:43.7986633Z ##[debug]Evaluating: SucceededNode()
2020-03-09T09:18:43.7987243Z ##[debug]Evaluating SucceededNode:
2020-03-09T09:18:43.7988551Z ##[debug]=> True
2020-03-09T09:18:43.7989187Z ##[debug]Result: True
2020-03-09T09:18:43.7989848Z ##[section]Starting: GitVersion
2020-03-09T09:18:43.7996812Z ==============================================================================
2020-03-09T09:18:43.7997210Z Task         : GitVersion Task
2020-03-09T09:18:43.7997597Z Description  : Easy Semantic Versioning (http://semver.org) for projects using Git
2020-03-09T09:18:43.7997964Z Version      : 5.1.2
2020-03-09T09:18:43.7998233Z Author       : GitVersion Contributors
2020-03-09T09:18:43.7998681Z Help         : See the [documentation](http://gitversion.readthedocs.org/en/latest/) for help
2020-03-09T09:18:43.7999149Z ==============================================================================
2020-03-09T09:18:44.2449271Z ##[debug]agent.TempDirectory=/home/vsts/work/_temp
2020-03-09T09:18:44.2475999Z ##[debug]loading inputs and endpoints
2020-03-09T09:18:44.2479976Z ##[debug]loading INPUT_VERSIONSPEC
2020-03-09T09:18:44.2492427Z ##[debug]loading INPUT_INCLUDEPRERELEASE
2020-03-09T09:18:44.2494675Z ##[debug]loading INPUT_USECONFIGFILE
2020-03-09T09:18:44.2496491Z ##[debug]loading INPUT_CONFIGFILEPATH
2020-03-09T09:18:44.2498042Z ##[debug]loading INPUT_UPDATEASSEMBLYINFO
2020-03-09T09:18:44.2500323Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2020-03-09T09:18:44.2502027Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2020-03-09T09:18:44.2504940Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2020-03-09T09:18:44.2513226Z ##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
2020-03-09T09:18:44.2513626Z ##[debug]loaded 9
2020-03-09T09:18:44.2528587Z ##[debug]Agent.ProxyUrl=undefined
2020-03-09T09:18:44.2528979Z ##[debug]Agent.CAInfo=undefined
2020-03-09T09:18:44.2529307Z ##[debug]Agent.ClientCert=undefined
2020-03-09T09:18:44.2529696Z ##[debug]Agent.SkipCertValidation=undefined
2020-03-09T09:18:44.2762134Z ##[debug]Agent.ProxyUrl=undefined
2020-03-09T09:18:44.2762566Z ##[debug]Agent.CAInfo=undefined
2020-03-09T09:18:44.2762961Z ##[debug]Agent.ClientCert=undefined
2020-03-09T09:18:44.2764463Z ##[debug]check path : /home/vsts/work/_tasks/UseGitVersion_bab30d5c-39f3-49b0-a7db-9a5da6676eaa/5.1.2/node_modules/azure-pipelines-tool-lib/lib.json
2020-03-09T09:18:44.2766029Z ##[debug]adding resource file: /home/vsts/work/_tasks/UseGitVersion_bab30d5c-39f3-49b0-a7db-9a5da6676eaa/5.1.2/node_modules/azure-pipelines-tool-lib/lib.json
2020-03-09T09:18:44.2766879Z ##[debug]system.culture=en-US
2020-03-09T09:18:44.2785264Z ##[debug]versionSpec=5.1.3
2020-03-09T09:18:44.2789839Z ##[debug]includePrerelease=false
2020-03-09T09:18:44.2790418Z ##[debug]targetPath=null
2020-03-09T09:18:44.2791276Z ##[debug]useConfigFile=true
2020-03-09T09:18:44.2793012Z ##[debug]configFilePath=/home/vsts/work/1/s/gitversion.yml
2020-03-09T09:18:44.2795399Z ##[debug]updateAssemblyInfo=false
2020-03-09T09:18:44.2796410Z ##[debug]updateAssemblyInfoFilename=null
2020-03-09T09:18:44.2797014Z ##[debug]additionalArguments=null
2020-03-09T09:18:44.2797519Z ##[debug]Build.SourcesDirectory=/home/vsts/work/1/s
2020-03-09T09:18:44.2814400Z ##[debug]INSTALL_TOOL=undefined
2020-03-09T09:18:44.2837729Z 
2020-03-09T09:18:44.2838479Z --------------------------
2020-03-09T09:18:44.2838938Z Installing GitVersion.Tool version 5.1.3
2020-03-09T09:18:44.2839539Z --------------------------
2020-03-09T09:18:44.2841745Z ##[debug]isExplicit: 5.1.3
2020-03-09T09:18:44.2842494Z ##[debug]explicit? true
2020-03-09T09:18:44.2844759Z ##[debug]isExplicit: 5.1.3
2020-03-09T09:18:44.2845300Z ##[debug]explicit? true
2020-03-09T09:18:44.2846623Z ##[debug]Agent.Version=2.165.0
2020-03-09T09:18:44.2847436Z ##[debug]Agent.ToolsDirectory=/opt/hostedtoolcache
2020-03-09T09:18:44.2847975Z ##[debug]checking cache: /opt/hostedtoolcache/GitVersion.Tool/5.1.3/x64
2020-03-09T09:18:44.2848810Z ##[debug]not found
2020-03-09T09:18:44.2849646Z ##[debug]isExplicit: 5.1.3
2020-03-09T09:18:44.2850226Z ##[debug]explicit? true
2020-03-09T09:18:44.2857659Z ##[debug]which 'dotnet'
2020-03-09T09:18:44.2865299Z ##[debug]found: '/usr/bin/dotnet'
2020-03-09T09:18:44.2865822Z ##[debug]which 'dotnet'
2020-03-09T09:18:44.2866546Z ##[debug]found: '/usr/bin/dotnet'
2020-03-09T09:18:44.2868066Z ##[debug]Agent.TempDirectory=/home/vsts/work/_temp
2020-03-09T09:18:44.2869512Z ##[debug]cleaning: 5.1.3
2020-03-09T09:18:44.2873164Z ##[debug]/usr/bin/dotnet arg: ["tool","install","GitVersion.Tool","--tool-path","/home/vsts/work/_temp","--version","5.1.3"]
2020-03-09T09:18:44.2877112Z ##[debug]exec tool: /usr/bin/dotnet
2020-03-09T09:18:44.2877499Z ##[debug]arguments:
2020-03-09T09:18:44.2877970Z ##[debug]   tool
2020-03-09T09:18:44.2878341Z ##[debug]   install
2020-03-09T09:18:44.2878927Z ##[debug]   GitVersion.Tool
2020-03-09T09:18:44.2879801Z ##[debug]   --tool-path
2020-03-09T09:18:44.2880344Z ##[debug]   /home/vsts/work/_temp
2020-03-09T09:18:44.2880998Z ##[debug]   --version
2020-03-09T09:18:44.2881512Z ##[debug]   5.1.3
2020-03-09T09:18:44.2891103Z [command]/usr/bin/dotnet tool install GitVersion.Tool --tool-path /home/vsts/work/_temp --version 5.1.3
2020-03-09T09:18:49.9638584Z 
2020-03-09T09:18:49.9639588Z Welcome to .NET Core 3.1!
2020-03-09T09:18:49.9640685Z ---------------------
2020-03-09T09:18:49.9641456Z SDK Version: 3.1.101
2020-03-09T09:18:49.9641829Z 
2020-03-09T09:18:49.9642222Z Telemetry
2020-03-09T09:18:49.9650320Z ---------
2020-03-09T09:18:49.9651854Z The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
2020-03-09T09:18:49.9652718Z 
2020-03-09T09:18:49.9653498Z Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
2020-03-09T09:18:49.9653955Z 
2020-03-09T09:18:49.9654495Z ----------------
2020-03-09T09:18:49.9662294Z Explore documentation: https://aka.ms/dotnet-docs
2020-03-09T09:18:49.9664081Z Report issues and find source on GitHub: https://github.com/dotnet/core
2020-03-09T09:18:49.9669809Z Find out what's new: https://aka.ms/dotnet-whats-new
2020-03-09T09:18:49.9670831Z Learn about the installed HTTPS developer cert: https://aka.ms/aspnet-core-https
2020-03-09T09:18:49.9671793Z Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs
2020-03-09T09:18:49.9672624Z Write your first app: https://aka.ms/first-net-core-app
2020-03-09T09:18:49.9673488Z --------------------------------------------------------------------------------------
2020-03-09T09:18:49.9674335Z You can invoke the tool using the following command: dotnet-gitversion
2020-03-09T09:18:49.9675168Z Tool 'gitversion.tool' (version '5.1.3') was successfully installed.
2020-03-09T09:18:49.9676833Z ##[debug]tool install result: success 
2020-03-09T09:18:49.9677404Z Caching tool: GitVersion.Tool 5.1.3 x64
2020-03-09T09:18:49.9693017Z ##[debug]source dir: /home/vsts/work/_temp
2020-03-09T09:18:49.9698135Z ##[debug]Agent.Version=2.165.0
2020-03-09T09:18:49.9698862Z ##[debug]Agent.ToolsDirectory=/opt/hostedtoolcache
2020-03-09T09:18:49.9699573Z ##[debug]destination /opt/hostedtoolcache/GitVersion.Tool/5.1.3/x64
2020-03-09T09:18:49.9704230Z ##[debug]rm -rf /opt/hostedtoolcache/GitVersion.Tool/5.1.3/x64
2020-03-09T09:18:49.9707313Z ##[debug]rm -rf /opt/hostedtoolcache/GitVersion.Tool/5.1.3/x64.complete
2020-03-09T09:18:49.9721200Z ##[debug]testing directory '/opt/hostedtoolcache/GitVersion.Tool/5.1.3/x64'
2020-03-09T09:18:49.9722499Z ##[debug]testing directory '/opt/hostedtoolcache/GitVersion.Tool/5.1.3'
2020-03-09T09:18:49.9723562Z ##[debug]testing directory '/opt/hostedtoolcache/GitVersion.Tool'
2020-03-09T09:18:49.9724386Z ##[debug]testing directory '/opt/hostedtoolcache'
2020-03-09T09:18:49.9725142Z ##[debug]mkdir '/opt/hostedtoolcache/GitVersion.Tool'
2020-03-09T09:18:49.9726342Z ##[debug]mkdir '/opt/hostedtoolcache/GitVersion.Tool/5.1.3'
2020-03-09T09:18:49.9727194Z ##[debug]mkdir '/opt/hostedtoolcache/GitVersion.Tool/5.1.3/x64'
2020-03-09T09:18:50.1048878Z ##[debug]Agent.Version=2.165.0
2020-03-09T09:18:50.1049647Z ##[debug]Agent.ToolsDirectory=/opt/hostedtoolcache
2020-03-09T09:18:50.1050286Z ##[debug]finished caching tool
2020-03-09T09:18:50.1064715Z ##[debug]toolPath: /opt/hostedtoolcache/GitVersion.Tool/5.1.3/x64
2020-03-09T09:18:50.1066017Z ##[debug]which 'dotnet'
2020-03-09T09:18:50.1066967Z ##[debug]found: '/usr/bin/dotnet'
2020-03-09T09:18:50.1067521Z ##[debug]set DOTNET_ROOT=../share/dotnet
2020-03-09T09:18:50.1076716Z ##[debug]Processed: ##vso[task.setvariable variable=DOTNET_ROOT;issecret=false;]../share/dotnet
2020-03-09T09:18:50.1080309Z ##[debug]Agent.Version=2.165.0
2020-03-09T09:18:50.1102260Z Prepending PATH environment variable with directory: /opt/hostedtoolcache/GitVersion.Tool/5.1.3/x64
2020-03-09T09:18:50.1103200Z ##[debug]new Path: /opt/hostedtoolcache/GitVersion.Tool/5.1.3/x64:/usr/share/rust/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
2020-03-09T09:18:50.1106936Z ##[debug]Processed: ##vso[task.prependpath]/opt/hostedtoolcache/GitVersion.Tool/5.1.3/x64
2020-03-09T09:18:50.1107874Z ##[debug]which 'dotnet-gitversion'
2020-03-09T09:18:50.1108540Z ##[debug]found: '/opt/hostedtoolcache/GitVersion.Tool/5.1.3/x64/dotnet-gitversion'
2020-03-09T09:18:50.1109147Z ##[debug]which 'dotnet-gitversion'
2020-03-09T09:18:50.1109744Z ##[debug]found: '/opt/hostedtoolcache/GitVersion.Tool/5.1.3/x64/dotnet-gitversion'
2020-03-09T09:18:50.1110678Z ##[debug]/opt/hostedtoolcache/GitVersion.Tool/5.1.3/x64/dotnet-gitversion arg: ["/home/vsts/work/1/s","/output","buildserver","/nofetch"]
2020-03-09T09:18:50.1111303Z ##[debug]configFilePath=/home/vsts/work/1/s/gitversion.yml
2020-03-09T09:18:50.1112194Z ##[debug]Absolute path for pathSegments: /home/vsts/work/1/s/gitversion.yml = /home/vsts/work/1/s/gitversion.yml
2020-03-09T09:18:50.1112774Z ##[debug]build.sourcesDirectory=/home/vsts/work/1/s
2020-03-09T09:18:50.1113327Z ##[debug]Absolute path for pathSegments: /home/vsts/work/1/s = /home/vsts/work/1/s
2020-03-09T09:18:50.1113831Z ##[debug]configFilePathpath supplied :true
2020-03-09T09:18:50.1114573Z ##[debug]/opt/hostedtoolcache/GitVersion.Tool/5.1.3/x64/dotnet-gitversion arg: ["/config","/home/vsts/work/1/s/gitversion.yml"]
2020-03-09T09:18:50.1115368Z ##[debug]exec tool: /opt/hostedtoolcache/GitVersion.Tool/5.1.3/x64/dotnet-gitversion
2020-03-09T09:18:50.1115836Z ##[debug]arguments:
2020-03-09T09:18:50.1117017Z ##[debug]   /home/vsts/work/1/s
2020-03-09T09:18:50.1117671Z ##[debug]   /output
2020-03-09T09:18:50.1118686Z ##[debug]   buildserver
2020-03-09T09:18:50.1119057Z ##[debug]   /nofetch
2020-03-09T09:18:50.1119385Z ##[debug]   /config
2020-03-09T09:18:50.1119763Z ##[debug]   /home/vsts/work/1/s/gitversion.yml
2020-03-09T09:18:50.1120723Z [command]/opt/hostedtoolcache/GitVersion.Tool/5.1.3/x64/dotnet-gitversion /home/vsts/work/1/s /output buildserver /nofetch /config /home/vsts/work/1/s/gitversion.yml
2020-03-09T09:18:50.8004630Z   INFO [03/09/20 9:18:50:79] Begin: Creating dictionary
2020-03-09T09:18:50.8061212Z   INFO [03/09/20 9:18:50:80] End: Creating dictionary (Took: 5.63ms)
2020-03-09T09:18:50.8093311Z   INFO [03/09/20 9:18:50:80] Begin: Storing version variables to cache file /home/vsts/work/1/s/.git/gitversion_cache/AF73E21AC22A0D7A7B19314709D44531421C1739.yml
2020-03-09T09:18:50.8535588Z   INFO [03/09/20 9:18:50:85] End: Storing version variables to cache file /home/vsts/work/1/s/.git/gitversion_cache/AF73E21AC22A0D7A7B19314709D44531421C1739.yml (Took: 43.89ms)
2020-03-09T09:18:50.8537484Z   INFO [03/09/20 9:18:50:85] Applicable build agent found: 'AzurePipelines'.
2020-03-09T09:18:50.8542458Z Executing GenerateSetVersionMessage for 'AzurePipelines'.
2020-03-09T09:18:50.8577669Z ##[debug]Update build number for build: 202221 to: 0.5.0 at backend.
2020-03-09T09:18:50.9536031Z ##[debug]Processed: ##vso[build.updatebuildnumber]0.5.0
2020-03-09T09:18:50.9537134Z Executing GenerateBuildLogOutput for 'AzurePipelines'.
2020-03-09T09:18:50.9538770Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.Major;]0
2020-03-09T09:18:50.9539938Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.Minor;]5
2020-03-09T09:18:50.9541017Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.Patch;]0
2020-03-09T09:18:50.9542082Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.PreReleaseTag;].69
2020-03-09T09:18:50.9543095Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.PreReleaseTagWithDash;]
2020-03-09T09:18:50.9544581Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.PreReleaseLabel;]
2020-03-09T09:18:50.9545475Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.PreReleaseNumber;]
2020-03-09T09:18:50.9546558Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.WeightedPreReleaseNumber;]
2020-03-09T09:18:50.9547674Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.BuildMetaData;]
2020-03-09T09:18:50.9548509Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.BuildMetaDataPadded;]
2020-03-09T09:18:50.9549940Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.FullBuildMetaData;]Branch.master.Sha.7d4208844a5bdaacf122b3e5168efba8d2cd3bb6
2020-03-09T09:18:50.9550876Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.MajorMinorPatch;]0.5.0
2020-03-09T09:18:50.9551746Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.SemVer;]0.5.0
2020-03-09T09:18:50.9552614Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.LegacySemVer;]0.5.0
2020-03-09T09:18:50.9553655Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.LegacySemVerPadded;]0.5.0
2020-03-09T09:18:50.9554571Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.AssemblySemVer;]0.5.0.0
2020-03-09T09:18:50.9555589Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.AssemblySemFileVer;]0.5.0.0
2020-03-09T09:18:50.9556425Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.FullSemVer;]0.5.0
2020-03-09T09:18:50.9557694Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.InformationalVersion;]0.5.0.0 7d42088
2020-03-09T09:18:50.9558714Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.BranchName;]master
2020-03-09T09:18:50.9559664Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.Sha;]7d4208844a5bdaacf122b3e5168efba8d2cd3bb6
2020-03-09T09:18:50.9560490Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.ShortSha;]7d42088
2020-03-09T09:18:50.9561295Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.NuGetVersionV2;]0.5.0
2020-03-09T09:18:50.9562241Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.NuGetVersion;]0.5.0
2020-03-09T09:18:50.9563069Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.NuGetPreReleaseTagV2;]
2020-03-09T09:18:50.9563861Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.NuGetPreReleaseTag;]
2020-03-09T09:18:50.9565040Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.VersionSourceSha;]d0fe1510364074c0a91ecda98a2567ef1eda1087
2020-03-09T09:18:50.9566118Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.CommitsSinceVersionSource;]69
2020-03-09T09:18:50.9567052Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.CommitsSinceVersionSourcePadded;]0069
2020-03-09T09:18:50.9568207Z ##[debug]Processed: ##vso[task.setvariable variable=GitVersion.CommitDate;]2020-03-09
2020-03-09T09:18:50.9569147Z ##[debug]Exit code 0 received from tool '/opt/hostedtoolcache/GitVersion.Tool/5.1.3/x64/dotnet-gitversion'
2020-03-09T09:18:50.9569978Z ##[debug]STDIO streams have closed for tool '/opt/hostedtoolcache/GitVersion.Tool/5.1.3/x64/dotnet-gitversion'
2020-03-09T09:18:50.9570513Z ##[debug]task result: Succeeded
2020-03-09T09:18:50.9578673Z ##[debug]Processed: ##vso[task.complete result=Succeeded;]GitVersion executed successfully
2020-03-09T09:18:50.9620050Z ##[section]Async Command Start: Update Build Number
2020-03-09T09:18:51.0773924Z Update build number to 0.5.0 for build 202221
2020-03-09T09:18:51.0774373Z ##[section]Async Command End: Update Build Number
2020-03-09T09:18:51.0776335Z ##[section]Finishing: GitVersion

Assignment Task

2020-03-09T09:18:51.0804859Z ##[debug]Evaluating condition for step: 'Update build number'
2020-03-09T09:18:51.0806568Z ##[debug]Evaluating: SucceededNode()
2020-03-09T09:18:51.0807122Z ##[debug]Evaluating SucceededNode:
2020-03-09T09:18:51.0808642Z ##[debug]=> True
2020-03-09T09:18:51.0809318Z ##[debug]Result: True
2020-03-09T09:18:51.0810217Z ##[section]Starting: Update build number
2020-03-09T09:18:51.0817377Z ==============================================================================
2020-03-09T09:18:51.0817738Z Task         : Bash
2020-03-09T09:18:51.0818218Z Description  : Run a Bash script on macOS, Linux, or Windows
2020-03-09T09:18:51.0818502Z Version      : 3.163.1
2020-03-09T09:18:51.0818776Z Author       : Microsoft Corporation
2020-03-09T09:18:51.0819145Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/bash
2020-03-09T09:18:51.0819925Z ==============================================================================
2020-03-09T09:18:51.2125288Z ##[debug]agent.TempDirectory=/home/vsts/work/_temp
2020-03-09T09:18:51.2160871Z ##[debug]loading inputs and endpoints
2020-03-09T09:18:51.2166779Z ##[debug]loading INPUT_TARGETTYPE
2020-03-09T09:18:51.2178035Z ##[debug]loading INPUT_FILEPATH
2020-03-09T09:18:51.2181983Z ##[debug]loading INPUT_SCRIPT
2020-03-09T09:18:51.2185123Z ##[debug]loading INPUT_WORKINGDIRECTORY
2020-03-09T09:18:51.2185829Z ##[debug]loading INPUT_FAILONSTDERR
2020-03-09T09:18:51.2186622Z ##[debug]loading INPUT_NOPROFILE
2020-03-09T09:18:51.2187291Z ##[debug]loading INPUT_NORC
2020-03-09T09:18:51.2187947Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2020-03-09T09:18:51.2188662Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2020-03-09T09:18:51.2189405Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2020-03-09T09:18:51.2196967Z ##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
2020-03-09T09:18:51.2198955Z ##[debug]loaded 11
2020-03-09T09:18:51.2224748Z ##[debug]Agent.ProxyUrl=undefined
2020-03-09T09:18:51.2225606Z ##[debug]Agent.CAInfo=undefined
2020-03-09T09:18:51.2226932Z ##[debug]Agent.ClientCert=undefined
2020-03-09T09:18:51.2227718Z ##[debug]Agent.SkipCertValidation=undefined
2020-03-09T09:18:51.2247746Z ##[debug]noProfile=true
2020-03-09T09:18:51.2252761Z ##[debug]noRc=true
2020-03-09T09:18:51.2269991Z ##[debug]check path : /home/vsts/work/_tasks/Bash_6c731c3c-3c68-459a-a5c9-bde6e6595b5b/3.163.1/task.json
2020-03-09T09:18:51.2271022Z ##[debug]adding resource file: /home/vsts/work/_tasks/Bash_6c731c3c-3c68-459a-a5c9-bde6e6595b5b/3.163.1/task.json
2020-03-09T09:18:51.2271633Z ##[debug]system.culture=en-US
2020-03-09T09:18:51.2289429Z ##[debug]failOnStderr=false
2020-03-09T09:18:51.2290695Z ##[debug]workingDirectory=/home/vsts/work/1/s
2020-03-09T09:18:51.2291898Z ##[debug]check path : /home/vsts/work/1/s
2020-03-09T09:18:51.2292314Z ##[debug]targetType=inline
2020-03-09T09:18:51.2293154Z ##[debug]script=echo "##vso[build.updatebuildnumber]0.5.0-202221"
2020-03-09T09:18:51.2330099Z Generating script.
2020-03-09T09:18:51.2332187Z ##[debug]which 'bash'
2020-03-09T09:18:51.2341970Z ##[debug]found: '/bin/bash'
2020-03-09T09:18:51.2342357Z ##[debug]Agent.Version=2.165.0
2020-03-09T09:18:51.2342747Z ##[debug]agent.tempDirectory=/home/vsts/work/_temp
2020-03-09T09:18:51.2343171Z ##[debug]check path : /home/vsts/work/_temp
2020-03-09T09:18:51.2358418Z ========================== Starting Command Output ===========================
2020-03-09T09:18:51.2361001Z ##[debug]which '/bin/bash'
2020-03-09T09:18:51.2361532Z ##[debug]found: '/bin/bash'
2020-03-09T09:18:51.2366212Z ##[debug]/bin/bash arg: --noprofile
2020-03-09T09:18:51.2367153Z ##[debug]/bin/bash arg: --norc
2020-03-09T09:18:51.2367736Z ##[debug]/bin/bash arg: /home/vsts/work/_temp/38c5d11c-6580-48c5-9912-677914a0e8f9.sh
2020-03-09T09:18:51.2373497Z ##[debug]exec tool: /bin/bash
2020-03-09T09:18:51.2373889Z ##[debug]arguments:
2020-03-09T09:18:51.2374449Z ##[debug]   --noprofile
2020-03-09T09:18:51.2374891Z ##[debug]   --norc
2020-03-09T09:18:51.2375413Z ##[debug]   /home/vsts/work/_temp/38c5d11c-6580-48c5-9912-677914a0e8f9.sh
2020-03-09T09:18:51.2377618Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/38c5d11c-6580-48c5-9912-677914a0e8f9.sh
2020-03-09T09:18:51.2467792Z ##[debug]Update build number for build: 202221 to: 0.5.0-202221 at backend.
2020-03-09T09:18:51.2875229Z ##[debug]Processed: ##vso[build.updatebuildnumber]0.5.0-202221
2020-03-09T09:18:51.2876252Z 
2020-03-09T09:18:51.2877253Z ##[debug]Exit code 0 received from tool '/bin/bash'
2020-03-09T09:18:51.2878065Z ##[debug]STDIO streams have closed for tool '/bin/bash'
2020-03-09T09:18:51.2878472Z ##[debug]task result: Succeeded
2020-03-09T09:18:51.2894771Z ##[debug]Processed: ##vso[task.complete result=Succeeded;done=true;]
2020-03-09T09:18:51.2897294Z ##[section]Async Command Start: Update Build Number
2020-03-09T09:18:51.4387040Z Update build number to 0.5.0-202221 for build 202221
2020-03-09T09:18:51.4388231Z ##[section]Async Command End: Update Build Number
2020-03-09T09:18:51.4389362Z ##[section]Finishing: Update build number
bug

Most helpful comment

Ok, so it looks like the task has to change to

# Compute the semantic version of the assemblies/image
- task: UseGitVersion@5
  displayName: 'GitVersion'
  name: Version
  inputs:
    versionSpec: '5.2.0'
    updateAssemblyInfo: false
    useConfigFile: true
    configFilePath: $(gitVersionConfig)

and then the subsequent tasks have to reference the step name as well as the variable, i.e.

# Update the reported build number to include semantic version and the numeric build id
- bash: |
    echo "##vso[build.updatebuildnumber]$(Version.GitVersion.NugetVersionV2)-$(Build.BuildId)"
  displayName: 'Update build number'

I see the value in the change in that the variables are now scoped, but can I just point out the irony of releasing a breaking change without obeying SemVer and increasing the version to 6.0,0 ;-)

All 31 comments

It seems that with v5.2.0, variables are now output variables.
See documentation on how to use them : https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#use-output-variables-from-tasks

Ok, so it looks like the task has to change to

# Compute the semantic version of the assemblies/image
- task: UseGitVersion@5
  displayName: 'GitVersion'
  name: Version
  inputs:
    versionSpec: '5.2.0'
    updateAssemblyInfo: false
    useConfigFile: true
    configFilePath: $(gitVersionConfig)

and then the subsequent tasks have to reference the step name as well as the variable, i.e.

# Update the reported build number to include semantic version and the numeric build id
- bash: |
    echo "##vso[build.updatebuildnumber]$(Version.GitVersion.NugetVersionV2)-$(Build.BuildId)"
  displayName: 'Update build number'

I see the value in the change in that the variables are now scoped, but can I just point out the irony of releasing a breaking change without obeying SemVer and increasing the version to 6.0,0 ;-)

first of all UseGitVersion is not supported, it is a temporary solution. The extension that is supported and will fix is https://marketplace.visualstudio.com/items?itemName=gittools.gittools. Now there was introduced a bug in 5.2.0 but it's not breaking change, that's the reason for 5.2.0 and not 6.0.0

i was having bug #2153.
then installed Nuget GitversionTask 5.2.0 on my class Librairie. rebuild is working fine locally. Now its my Azure pipeline line nuget pack that have an ERROR.

--------------------------------------------------------
Starting: NuGet pack
==============================================================================
Task         : NuGet
Description  : Restore, pack, or push NuGet packages, or run a NuGet command. Supports NuGet.org and authenticated feeds like Azure Artifacts and MyGet. Uses NuGet.exe and works with .NET Framework apps. For .NET Core and .NET Standard apps, use the .NET Core task.
Version      : 2.166.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/package/nuget
==============================================================================
C:\windows\system32\chcp.com 65001
Active code page: 65001
##[error]No value was found for the provided environment variable.
Attempting to pack file: D:\a\1\s\SystemBOXWinSDK\Package.nuspec
C:\hostedtoolcache\windows\NuGet\4.1.0\x64\nuget.exe pack D:\a\1\s\SystemBOXWinSDK\Package.nuspec -NonInteractive -OutputDirectory D:\a\1\a -Properties Configuration=release -Symbols -Verbosity Detailed
System.ArgumentException: Value cannot be null or an empty string.
Parameter name: value
   at NuGet.Versioning.NuGetVersion.Parse(String value)
   at NuGet.Packaging.ManifestReader.ReadMetadataValue(ManifestMetadata manifestMetadata, XElement element, HashSet`1 allElements)
   at NuGet.Packaging.ManifestReader.ReadMetadata(XElement xElement)
   at NuGet.Packaging.ManifestReader.ReadManifest(XDocument document)
   at NuGet.Packaging.Manifest.ReadFrom(Stream stream, Func`2 propertyProvider, Boolean validateSchema)
   at NuGet.Packaging.PackageBuilder.ReadManifest(Stream stream, String basePath, Func`2 propertyProvider)
   at NuGet.Packaging.PackageBuilder..ctor(String path, String basePath, Func`2 propertyProvider, Boolean includeEmptyDirectories)
   at NuGet.Commands.PackCommandRunner.CreatePackageBuilderFromNuspec(String path)
   at NuGet.Commands.PackCommandRunner.BuildFromNuspec(String path)
   at NuGet.CommandLine.PackCommand.ExecuteCommand()
   at NuGet.CommandLine.Command.ExecuteCommandAsync()
   at NuGet.CommandLine.Command.Execute()
   at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)
NuGet Version: 4.1.0.2450
Attempting to build package from 'Package.nuspec'.
##[error]The nuget command failed with exit code(1) and error(System.ArgumentException: Value cannot be null or an empty string.
Parameter name: value
   at NuGet.Versioning.NuGetVersion.Parse(String value)
   at NuGet.Packaging.ManifestReader.ReadMetadataValue(ManifestMetadata manifestMetadata, XElement element, HashSet`1 allElements)
   at NuGet.Packaging.ManifestReader.ReadMetadata(XElement xElement)
   at NuGet.Packaging.ManifestReader.ReadManifest(XDocument document)
   at NuGet.Packaging.Manifest.ReadFrom(Stream stream, Func`2 propertyProvider, Boolean validateSchema)
   at NuGet.Packaging.PackageBuilder.ReadManifest(Stream stream, String basePath, Func`2 propertyProvider)
   at NuGet.Packaging.PackageBuilder..ctor(String path, String basePath, Func`2 propertyProvider, Boolean includeEmptyDirectories)
   at NuGet.Commands.PackCommandRunner.CreatePackageBuilderFromNuspec(String path)
   at NuGet.Commands.PackCommandRunner.BuildFromNuspec(String path)

Can someone provide step to resolution . I'm using the Azure piepline NugetPack action .
this is what it does: ( ViewXAML)

steps: 
- task: NuGetCommand@2
  displayName: 'NuGet pack'
  inputs:
    command: pack
    packagesToPack: SystemBOXWinSDK/Package.nuspec
    versioningScheme: byEnvVar
    versionEnvVar: GitVersion.FullSemVer
    includeSymbols: true

Well,

i uninstalled 5.2.0 , (by hand) removing references in Pakage.confog and csproj of Gitverstiontask 5.2.0. saved my solution , closed , reopen.
then serach for gitversiontask 5.0.1 , installed it .

Commit and push to Azure.
pipeline worked number 1 ... read my GitVersionConfig.yaml , all is fine....

so i will uninstall 5.1.3 and not put 5.2.0 on all my 5 c# librairies untill someone fix all this or give a clear explaination on how to prepare csproj to use 5.2.0 on AZURE with nuget pack , build etc.

so long

@arturcic It may not be "supported" but it's the public version of the DevOps task that you recommend to use for now since GitVersion@4 won't pick up later versions of the tool and AFAIK the GitTools package isn't ready for use.

If you can tell me which one to use now, I'm happy to update the docs etc and set up a sample pipeline so we have some integration tests/examples

hello phatcher,

i'm so lost in all this . i really don't understand the verbage used here .
if you can explain me what you are locking for like i'm a 6 year old ...i.ll be glad to help.

bernie

i did an export of pipeline ,
is it what you asked for?
remember now this is with gitversiontask 5.0.1 and it works fine, locally and on AZURE.
SystemBOXWinSDK sln -develop.txt

GitVersionConfig.txt

https://github.com/GitTools/GitVersion/issues/2162#issuecomment-597000922 fixed it for us.

Before

- task: UseGitVersion@5
  inputs:
    versionSpec: '5.x'

- task: NuGetCommand@2
  inputs:
    command: 'pack'
    versioningScheme: 'byEnvVar'
    versionEnvVar: 'GitVersion.SemVer'

After

- task: UseGitVersion@5
  name: UseGitVersion
  inputs:
    versionSpec: '5.x'

- task: NuGetCommand@2
  inputs:
    command: 'pack'
    versioningScheme: 'byEnvVar'
    versionEnvVar: 'UseGitVersion.GitVersion.SemVer'

I'm very frustrated because I wasn't able to configure these GitVersion tasks in Azure DevOps
This lack of information and misleading documentation are insane.

I tried this one. doesn't work

 - task: gitversion/setup@0
   inputs:
     versionSpec: '5.x'
 - task: gitversion/execute@0
   inputs:
     useConfigFile: true
     configFilePath: 'GitVersion.yml'
     additionalArguments: ''

https://github.com/GitTools/actions/issues/62

And tried this one. doesn't work

 - task: UseGitVersion@5
   name: UseGitVersion
   inputs:
     versionSpec: '5.x'
     useConfigFile: true
     configFilePath: 'GitVersion.yml'

I got this error:
##[error]Error: EINVAL: invalid argument, readlink '/opt/hostedtoolcache/dotnet/dotnet'

With both versions, the install went well

Seeing the same that the environment variables have suddenly been prefixed by USEGITVERSION. Simple solution by changing references that follow the UseGitVersion step or pin versionSpec:

- task: UseGitVersion@5
  displayName: GitVersion
  inputs:
    versionSpec: '5.1.3'

first of all UseGitVersion is not supported, it is a temporary solution. The extension that is supported and will fix is https://marketplace.visualstudio.com/items?itemName=gittools.gittools

@arturcic to clarify, does that mean the UseGitVersion extension is deprecated? Should this be (more) apparent on both the GitVersion docs and the Visual Studio Marketplace?

@pherbel sorry about that, any help in improving that is welcomed. Don't forget we're doing this in our free time that is not our day to day work

Seeing the same that the environment variables have suddenly been prefixed by USEGITVERSION. Simple solution by changing references that follow the UseGitVersion step or pin versionSpec:

- task: UseGitVersion@5
  displayName: GitVersion
  inputs:
    versionSpec: '5.1.3'

first of all UseGitVersion is not supported, it is a temporary solution. The extension that is supported and will fix is https://marketplace.visualstudio.com/items?itemName=gittools.gittools

@arturcic to clarify, does that mean the UseGitVersion extension is deprecated? Should this be (more) apparent on both the GitVersion docs and the Visual Studio Marketplace?

UseGitVersion was a compromise. We needed to move the azure task from embedding to downloading the GitVersion.Tool. It's still the one to be used till we get the GitTools bundle stable.

When the GitTools bundle reaches version 1.0.0 it should be considered as stable and usable, and at that moment the UseGitVersion will get deprecated. Still the UseGitVersion can be used even after it gets deprecated, as it's just download the tool and uses it. But it's not going to be supported

@arturcic and thank you for all that time spent.

version 5.0.1 works fine ..... take your time . For the price i paided GitVersion is Great!! :)

Looks like the "bug" is related to this change #2012 to allow variables to be shared across the pipeline.

Not knowing how any of this works, can variables be exposed within the same job without the prefix and outside of the job with the prefix by returning multiple items at https://github.com/GitTools/GitVersion/blob/cfff762472ac45abd66890289f4fcfd2c288913f/src/GitVersionCore/BuildServers/AzurePipelines.cs#L20-L26
by changing it to be like so?

public override string[] GenerateSetParameterMessage(string name, string value)
{
    return new[]
    {
        $"##vso[task.setvariable variable=GitVersion.{name}]{value}",
        $"##vso[task.setvariable variable=GitVersion.{name};isOutput=true]{value}"
    };
}

This should be a simple fix and it has great impact on the amount of work that would have to be done to use "Reference Names" in our tasks and then go and update all the areas that where using $(GitVersion.) to now use the $($(ReferenceName).GitVersion...)

This break really breaks a lot of backwards compatibility.

I have also been advised by some of my colleges that "gittools.gitversion" has been deprecated. Can I get a conformation that is not the case and we should NOT be using the "UseGitVersion" task?

https://marketplace.visualstudio.com/items?itemName=gittools.gitversion

It even states [Deprecated] on the market place.

image

@PNI-GS here's a summary of the marketplace tasks based on the discussion above.

| Task | Remarks |
| --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| GitVersion | DEPRECIATED. DO NOT USE. |
| UseGitVersion | Temporary workaround/replacement for GitVersion. |
| GitTools | Will eventually replace UseGitVersion. Currently in preview version. |

Our team is currently using UseGitVersion. We will switch to GitTools when a stable version of it is released.

@PNI-GS here's a summary of the marketplace tasks based on the discussion above.

Task Remarks
GitVersion DEPRECIATED. DO NOT USE.
UseGitVersion Temporary workaround/replacement for GitVersion.
GitTools Will eventually replace UseGitVersion. Currently in preview version.
Our team is currently using UseGitVersion. We will switch to GitTools when a stable version of it is released.

That is a correct summary

@arturcic

Ok. I will look at using UseGitVersion with v 5.1.3 as 5.2.0 has the above mentioned issues.

What is the reason for having 3 different custom tasks? It has been really confusing. it would have been better to just update the original one to a new version of the task to add/modify features.

I think I explained here https://github.com/GitTools/GitVersion/issues/2162#issuecomment-597695865.

We could not update the original task as it had a different syntax and it would break those using it.

@arturcic I think the suggestion by @Stevoni is sensible as a 5.2.1 release (if it's possible) as it makes everyone's pipelines work without change.

What I'll do is update the guidance documentation for DevOps to reflect the current behaviour

Documented the changes in #2172, please amend as necessary.

I think we can implement the suggestion https://github.com/GitTools/GitVersion/issues/2162#issuecomment-597859122 as I think it might work, and then the changes you propose might not be needed

I've been struggling with this as well (until I found this issue), but eventually found out how to use UseGitVersion 5.2.0 in Azure DevOps. Here's what I did:

  • Set name (and displayName) for UseGitVersion task, add "buildserver output":
  - task: UseGitVersion@5
    name: gv
    displayName: 'Set versioning with UseGitVersion'
    inputs:
      versionSpec: '5.x'
      updateAssemblyInfo: true
      additionalArguments: '/output BuildServer'
  • When referencing variables, prepend with _task name_ (since they are output variables as of 5.2.0), as in:
    $(gv.GitVersion.InformationalVersion)

  • No need to predefine any (empty) variables set by GitVersion later on, as stated in GitVersion documentation.

According to Azure DevOps documentation, one needs to set name of tasks for output variables, but maybe this is defaulted to GitVersion? I use a short name and then displayname mainly for shorter variable references.


:tada: This issue has been resolved in version 5.2.2 :tada:
The release is available on:

Your GitReleaseManager bot :package::rocket:

can you guys check version 5.2.2 fixes the issue

can you guys check version 5.2.2 fixes the issue

Seems to be working for me. I was brought here when my build began to fail this morning. Updated and pinned to 5.2.2

@gojanpaolo Thanks for the info. It is useful!
@tbergstedt Thanks it helps too.
@arturcic
Of course appreciate your work.
I'm sure there are some community member who can help you out.
And I also encourage you to setup GitHub sponsor. I'm sure there are a bunch of people who use your tool and happy to sponsor.

@bking-panasonic Could you share your setup please?

@pherbel you mean for the task itself?
```

  • task: UseGitVersion@5
    displayName: GitVersion 5.2.2
    inputs:
    versionSpec: '5.2.2'
    updateAssemblyInfo: true
    updateAssemblyInfoFilename: '$(Build.SourcesDirectory)\src_Shared\GlobalAssemblyInfo.cs'

@bking-panasonic Thanks.

Now it works for me with UseGitVersion task.

- task: UseGitVersion@5
  name: UseGitVersion
  inputs:
    versionSpec: '5.x'
    useConfigFile: true
    configFilePath: 'GitVersion.yml'

Variables used like this:
$(UseGitVersion.GitVersion.FullSemVer)

GitTools still has a bug: https://github.com/GitTools/actions/issues/62

Important note!!!
Don't use UseDotnet task before the GitVersion.
https://github.com/GitTools/actions/issues/65

Was this page helpful?
0 / 5 - 0 ratings