question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GitBuildVersion not being set when run on self-hosted agent

See original GitHub issue

Today I updated the projects in my solution to NBGV 3.3.37 nuget package from 3.0.48. This was the only change made.

My deployment builds, run on a self-hosted agent, no longer show the ‘pretty’ version in my Azure pipeline history and has reverted to the 20201030.1 format.

More importantly some of my artifacts rely on the GitBuildVersion variable and no longer set. My artifact names now look like product-x86-$(GitBuildVersion).zip instead of product-x86-1.0.22.zip. The log no longer outputs lines like the following: 2020-10-27T17:34:14.0357436Z ##[section]Async Command Start: Update Build Number 2020-10-27T17:34:14.0358030Z Update build number to 1.0.22 for build 9534 2020-10-27T17:34:14.0358433Z ##[section]Async Command End: Update Build Number

My CI builds, that are run on Azure cloud hosted agents, get their build version updated and artifact names are as expected. Its just when I run the deploy script on the self-hosted agent is when I see the issue.

I checked the doc/cloudbuild.md documentation and did not see any breaking changes from older versions. I build with .NET Framework and do not want to add tasks to install dotnet core just to run the set variables script.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:20

github_iconTop GitHub Comments

1reaction
rogerstewartcommented, Sep 6, 2022

@julealgon two things helped my situation.

  1. I had to turn off parallel builds in my Azure CI/CD builds by setting the maxcpucount switch to false. In the yaml VSBuild task it is maximumCpuCount.
  2. More specific to my case, I also had Project Dependencies set for some projects that no longer needed them. I mention this because the projects and the dependencies referenced NBGV.

Unfortunately to this day, when running CI/CD jobs in Azure DevOps, I have not been able to build the projects in my solutions in parallel and receive output with the expected version information. With that said, though, I am running older NGV versions and have not had the time to try upgrading to see if my issues would be resolved.

1reaction
rogerstewartcommented, Jan 22, 2021

I was able determine and fix the issue on my side. Unfortunately, I was unable to reproduce in a slimmed down repo.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Self hosted agent won't start for yaml pipeline
I'm trying to setup my first yaml pipeline. I already have an agent pool setup of self-hosted agents. When I try to run...
Read more >
Unable to make Azure Agent Service run as my self
I'm trying to work around a problem with my Self-hosted Azure Pipeline agent. One of the workarounds listed here is to make the...
Read more >
How To Run Self-Hosted Azure DevOps Build/Release ...
Setting up and running a self-hosted agent is a relatively simple process, with the primary requirement being running the correct agent for the ......
Read more >
Self-hosted Windows agents - Azure Pipelines
You should run agent setup manually the first time. After you get a feel for how agents work, or if you want to...
Read more >
Create Azure DevOps Self Hosted Agent
Open PowerShell ISE on the Windows machine and execute the below command. cd C:\ #base location for the agent folder. You can set...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found