Questions tagged [azure-pipelines-build-task]

Questions on extending the Visual Studio Team Services Build and Release Management system through extensions and custom tasks.

Build task for Visual Studio Team Services which enables you to extend the VSTS build system with your own custom tasks.

msdn: add-build-task

1042 questions
12
votes
1 answer

How to run NUnit test in Visual Studio Team Services

When I try to execute NUnit test in VSTS task I am getting the following error: Warning: The path 'C:\a\1\s\INCASOL.IP\packages' specified in the 'TestAdapterPath' does not contain any test adapters, provide a valid path and try again. I have these…
11
votes
3 answers

Set VSTS output variable to be result from bash command

I'm running a task in VSTS which performs some operations on a variable from a previous step and I then need to output the result to be used in future tasks. I have the following in a command line task running on a linux build host but am having no…
11
votes
3 answers

VSTS build Copy Files task copies full path to destination

I'm using a Copy Files task in a VSTS build to copy the results of a VS project (bin\Release folder) to a subfolder in the staging directory. What I expect is that the contents of the bin folder should be in the staging\bin folder: drop\bin\ but…
gregsdennis
  • 7,218
  • 3
  • 38
  • 71
10
votes
3 answers

Export tests results from Azure DevOps

I might be missing something, but can't find a way to export tests run results from the project's build pipeline execution page in Azure DevOps. There is a "Download logs" option, of cause, where you technically can find logs from tests execution…
10
votes
2 answers

Set "Path" environment variable during vsts build so it would persist across build tasks specifically vsTest task

I have a vsts build definition in which I try to set the PATH environment variable using PowerShell (and before I tried cmd) task, so that in a later vsTest task, the tests could run an exe from that path, however setting the PATH using the ps\cmd…
9
votes
2 answers

NG Build fails in Azure Pipelines with NPM error 134

Approx 50% of my hosted builds are failing with npm error 134. I am building the same commit with the same build definition using hosted vs2017. I am building an Angular Application using the Angular CLI. The npm task calls 'run build' which is…
9
votes
1 answer

Get the sources from the branch that triggered the build in Team Services

I would like to create an integration build in VS Team Services, that is triggered when a commit is done to any branch (develop/feature xy) except master. I am able to create a trigger for this: but how do i checkout the sources of the branch…
9
votes
3 answers

How to add secret variable as task environment variable in VSTS

This documentation states that secret variables are Not decrypted into environment variables. So scripts and programs run by your build steps are not given access by default. One of my build tasks require that an environment variable be set that…
ajbeaven
  • 9,265
  • 13
  • 76
  • 121
9
votes
2 answers

VSTS NuGet pack exclude test projects

I am using VSTS vNext build system to build a C# solution. Below you can see the settings for the NuGet Packager. The path to nuspec files is set to reference the .csproj files. However this includes all .csproj files; I need to exclude test…
8
votes
3 answers

Error CS0104: 'Guid' is an ambiguous reference between 'System.Guid' and 'System.Guid'

On one of my projects I have enabled ImplicitUsings (C# 10) feature. The project is an Sdk project multi-targeting .NET 4.8 Framework and .NET 6. As of yesterday my builds started failing on Azure DevOps with the following error: Error CS0104:…
Bouke
  • 11,768
  • 7
  • 68
  • 102
8
votes
3 answers

The $(Build.ArtifactStagingDirectory) variable's value changes when deploying a build in Azure DevOps Pipelines

I have a DACPAC deployment task which is failing, because for some reason the value of the $(Build.ArtifactStagingDirectory) pipeline variable is changing between the build pipeline and the release pipeline. In the build pipeline, the variable is…
8
votes
1 answer

How to properly do file transforms on Azure Pipelines

I am attempting to do file transforms on my Web.config depending on each environment I publish to. Mostly, everything looks fine until I deploy to my UAT stage on the release pipeline. In my build pipeline, here is the YAML file that I am using: #…
8
votes
3 answers

Azure pipelines submodules clone failed

I created main project https://dev.azure.com/GilbertHsu/pipeline_test with 3 projects as submodules in the main…
8
votes
3 answers

Azure pipeline set displayname of task based on condition

In the build pipeline I have a job with a powershell script setting the applicatiuon name based on a variable like this: $applicationName = If ('$(configuration)' -eq 'Release') { 'Appname' } Else { 'Appname-Test' } Write-Host…
8
votes
3 answers

How can I set a Azure DevOps Pipeline Varible which contains the date in this Format: 25.07.2020

I'm not using yaml, because my company uses TFVC, so I need the classic way. With $[pipeline.startTime] I get the starttime, but now I need it formated in this way: dd.MM.yyyy A powershellscript like in VSO(TFS) - get current date time as variable…
1 2
3
69 70