5

We have a build agent (a self hosted buildserver) which apparently satisfies msbuild, but not visualstudio so we tried to install vs.

I installed vs2022 community on the server and restarted.

Still those mails comes when a change is detected in the repository.

No agent found in pool XXX which satisfies the following demand: visualstudio. All demands: msbuild, visualstudio, Agent.Version -gtVersion 2.192.0

Is community not an option?

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
Anders Lindén
  • 6,839
  • 11
  • 56
  • 109

2 Answers2

4

Azure DevOps Server 2020 and below only officially supports Visual Studio 2019 and below for the tasks and the agent version it ships with. The latest agent version for Azure DevOps (Service) has the right updated scripts in the Capability Providers.

In case this is on an Azure DevOps Server and want to use Visual Studio 2022 / .NET 6, you need to:

  1. Set a magic environment variable to be able to run a more recent agent version:

    AZP_AGENT_DOWNGRADE_DISABLED=true 
    
  2. Upgrade to/Install agent version 2.195.0 or newer.

  3. Install the Visual Studio 2022 compatible Visual Studio and MsBuild tasks into your server. Either by directly overwriting the tasks on the server:

    npm install -g tfx-cli
    tfx build tasks upload --task-zip-path Task.guid-version.zip --service-url https://yourtfs.com/tfs/DefaultCollection
    

    You can download the latest zip file from my GitHub repo. Or download them yourself with my script. Or installing them side-by-side as an extension which will give the tasks get a new unique id and a different reference name.

I've laid out the process in this GitHub repo and blogpost:

The expectation is that Azure DevOps Server 2022 will be the first version to ship with official support for Visual Studio 2022.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
1

Community is an option (but I did not test 2022). Check agent capabilities.

enter image description here

Shamrai Aleksander
  • 13,096
  • 3
  • 24
  • 31