user687554
user687554

Reputation: 11151

VSTS - Archive DotNet Build

I'm learning about build pipelines in VSTS. I'm trying to 1) build a "hello world" .NET project and 2) zip up the executable. At this time, I have a build pipeline with two tasks. Those two tasks are defined like this:

.NET Core

Command: build
Path to Project(s): ./MyConsoleApp/MyConsoleApp.csproj
Arguments: --configuration Release --runtime linux-x64

Archive Files

Root folder or file to archive: $(Build.BinariesDirectory)
Prepend root folder or file to archive paths: checked
Archive file to create: $(Build.ArtifactStagingDirectory)/MyConsoleApp.zip

I then have a task that uploads the file to AWS. This build pipeline successfully runs. The build task (.NET Core) build successfully with no errors or warnings. The archive files task successfully creates the .zip file. I can see the .zip file in AWS. However, when I download the .zip file, it's kind of empty. The only thing that's in it is a directory named "b". I was expecting to see the contents of bin\Release\netcoreapp2.1\linux-x64.

What am I missing? Where are the files associated with my build?

Thanks!

Upvotes: 0

Views: 217

Answers (1)

Daniel Mann
Daniel Mann

Reputation: 59045

Specify the --output flag on your dotnet build command and specify an output location of $(Build.BinariesDirectory).

Upvotes: 0

Related Questions