Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Azure by (45.3k points)

PreInfo: I have .net core web api (vs2015) mixed with just ordinary projects.

I have spent almost 2 days now to get this to work and search and tried everything I can think of, but I just cant for the live of me get the build and release in TFS online to play together.

The build (publish artifact step) says "Directory 'D:\a\1\a' is empty. Nothing will be added to build artifact 'drop'."

but the "run dot net" step says

"Published to D:\a\1\s\Operator\MobileService\root\MobileService\src\AMP.Operator.MobileService\bin\release\net452\win7-x64\publish"

...so it must be somewhere the release can pick it up but no matter what I try I can´t get it to be picked up.

Here is my build setup My build

dotnet run dotnet run

publishing the publish

And the realse with $(System.DefaultWorkingDirectory)/MobileService-Dev please note that I have tried every combo of $(build.artifactstagingdirectory) in the build to publish without luck but I sure this should point to the publishing folder for the build realse

I so hope somebody can point me to a solution. I just can´t understand how hard it is to make this work..

1 Answer

0 votes
by (16.8k points)

Please add a Copy Files step in your build definition, which will copy your build artifacts from your msbuild results to the Build's Artifact Directory before you run the Publish Artifact.

  • Source Folder: $(Build.SourcesDirectory)
  • Contents: **\bin\$(BuildConfiguration)\**
  • Target Folder: $(Build.ArtifactStagingDirectory)
Copy Files Task
The Publish Build Artifacts step used here has the same steps as yours, except the only control option enabled is Enabled

Browse Categories

...