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
17
votes
3 answers

How to fail the build pipeline if "Tests Failed" in azure pipelines?

I want to fail the build pipeline if a single test failed with azure pipelines. Azure can successfully detect that my tests entered a failed state however it gives a success state to the entire build pipeline: The question is how to make azure give…
Mawardy
  • 3,618
  • 2
  • 33
  • 37
16
votes
1 answer

Excluding projects when executing the DotNetCoreCLI@2 task

I am trying to exclude projects when executing the DotNetCoreCLI@2 task with build publish command. I have some test projects (and others) that I don't want to run publish. I have tried file matching according to this and this, but I can't get to…
Rune G
  • 1,447
  • 2
  • 12
  • 26
16
votes
1 answer

##[error]Could not find version number data in the following environment variable: BUILD_BUILDNUMBER

I am using below yaml to generate my NuGet pkg. I want to have a unique id with a date for my package. but I keep getting an error saying ould not find version number data in the following environment variable: BUILD_BUILDNUMBER ##[error]Could not…
16
votes
1 answer

Azure DevOps Build Task: create a zip with contents identical to Visual Studio Publish

In Visual Studio, when we publish to a folder, that folder contains exactly what we need to deploy. In Azure Pipeline, the Build Solution task produces a a bunch of (to us) unnecessary files plus a zip file (nice!). The zip contains the files we…
biscuit314
  • 2,384
  • 2
  • 21
  • 29
16
votes
3 answers

Removing unnecessary parameters from VSTS task group

I have a task group which contains besides other tasks the Azure Key Vault task and the Azure Resource Group Deployment task. In the latter I want to override some parameters in the ARM template with values which come from the key vault. The Secrets…
Yavuz
  • 630
  • 6
  • 20
15
votes
3 answers

This project references NuGet package(s) that are missing on this computer. The missing file is ..\packages\NUnit.3.10.1\build\NUnit.props

I am encountering the error during the Build phase of an Azure Pipeline on the Azure DeveOps site. Specifically, the packages it is complaining about…
15
votes
7 answers

What does the "One of the deployment parameters has an empty key" mean in VSTS ARM release

My ARM template resource group deployment fails in VSTS. I get an error without any specific reference to parameter that has an issue: "One of the deployment parameters has an empty key. Please see https://aka.ms/arm-deploy/#parameter-file for…
14
votes
3 answers

Increment variable value in TFS build +1

I have a Microsoft Visual Studio Team Foundation Server (Version 15.117.26714.0) with predefined variable $(ProjectBuildNumber). Is there any way to increment, during build process, value of variable with minor build number by…
14
votes
2 answers

What is the difference between Copy Files vs Publish Artifact task in VSTS?

In my Copy Files task, I am copying the required files to the file share location from which I will be doing the deployment. What is the use of publishing artifact step? Or it is obsolete in my case. I am confused about the what values should be put…
tRuEsAtM
  • 3,517
  • 6
  • 43
  • 83
13
votes
2 answers

YAML Nuget restore

Trying to create a build configuration in Azure DevOps, using the new YAML build feature, however I can't seem to get NuGet restore to work when referring to a NuGet.config file (places in the root of my projectfolder) In my YAML build file I…
smolesen
  • 1,153
  • 3
  • 11
  • 29
13
votes
5 answers

VSTS/Azure DevOps: Auto-Increment NuGet Package Version on Pack

Running the .NET Core Pack task, how do I get the outputted NuGet package version to auto-increment itself? So, for example, if my current version is 1.0.0, then the next time I call the Pack task, I would like to see 1.0.1. I'm using environment…
13
votes
2 answers

How to get the associated changes, check-in comments and linked work items for a particular build/release in VSTS

I am using SendGrid email extension to trigger a custom email notification after the CI/CD process is complete in VSTS. This email task has HTML content in it which includes some content fetched using standard build/release variables…
12
votes
1 answer

Specifying Dockefile Path in Azure Pipelines

We are trying to use Azure Pipelines to build Docker image for a Dot Net Core App. When setting up the pipeline if I check "default build context" will it automatically pick the Dockerfile from my root directory? Dockerfile is currently in the root…
12
votes
2 answers

How to use matrix variable within pool demands?

For an Azure Pipelines yaml file I want to run a set of tasks once on every agent in a certain pool. When I looked at jobs strategy matrix, it looked as a good solution for this, but it currently cannot pick-up the variable I use for this. The…
12
votes
3 answers

How to get the variable value in TFS/AzureDevOps from Build to Release Pipeline?

I've defined a variable in my TFS/AzureDevops Build definition (say it's time) and assign the value using PowerShell task within my build definition. Like, Type: Inline Script. Inline script: $date=$(Get-Date -Format g); Write-Host…
1
2
3
69 70