0

I've successfully setup and run a self hosted docker build agent using the instructions here: https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/docker?view=azure-devops however VS builds won't run on that agent because it doesn't fulfil a demand for Visual Studio. So my question is

How do install Visual Studio in the docker build agent?

However I've got a feeling this is the wrong question as the project can be build from the command line using dotnet, so an alternative question might be

How to I remove this demand for VS from my build pipeline?

I can't see as I've declared this demand anywhere in the YAML.

Greg B
  • 14,597
  • 18
  • 87
  • 141
  • 1
    `How do install Visual Studio in the docker build agent?` You can install Visual Studio Build Tools in docker file and then use the built image in the container. Here is the [document](https://learn.microsoft.com/en-us/visualstudio/install/build-tools-container?view=vs-2019) you can refer to. – Hugh Lin Jan 22 '21 at 08:44
  • Maybe if you can share the pipeline, we can see where the demand is coming from? Is this a .NET Framework or Core project/solution? – alv Jan 22 '21 at 20:49
  • @HughLin-MSFT can you post that as an answer rather than a comment so I can accept it as the solution. Thanks – Greg B Jan 25 '21 at 11:35
  • @Greg B I have converted the comment to answer, thank you for your reminder. :) – Hugh Lin Jan 26 '21 at 01:46

1 Answers1

1

How do install Visual Studio in the docker build agent?

For this issue, you can install Visual Studio Build Tools in docker file and then use the built image in the container.

For details, please refer to this official document.

Hugh Lin
  • 17,829
  • 2
  • 21
  • 25