简体   繁体   中英

Is it possible to get the visual studio build folder name over azure devops?

We are using azure devops for CI/CD, but we got a problem with our build pipelines. When creating visual studio build, we would like to get the specific folder where the build is created, so we can copy the folder (add outputpath parameter to visual studio task doesn't work with some projects).

The main problem is, that name of the project and the repo can be different. We would need something like:

$(agent.builddirectory)\s\PROJECT-NAME\bin\Release

Is there a way to get the project name or the output folder? $(agent.builddirectory) isn't working.

EDIT: We need to use the build pipelines at this point, so currently we don't work with artifacts or release pipelines (we know we should...)

It seems like you are using Azure Pipelines to do what MSBuild / dotnet cli are made to help you.

You can instead use msbuild / dotnet cli to build and pack your project output to a designated location, like output in the repository root folder, that is common across all projects that use the pipeline.

If you only checkout 1 repository, all tasks will be executed in the repository folder. You do not need to mess with $(agent.builddirectory)\s\xxxx . Accessing output is as simple as output/ in your pipeline.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM