Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access artifacts folder after build in TFS online?

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..

like image 306
Sturla Avatar asked Jan 31 '17 16:01

Sturla


People also ask

Where the artifact packages get stored?

If you publish it to an internal feed, it's stored in your TFS database. If you publish it to an external feed, it's stored there.

Where are azure pipeline artifacts stored?

If you publish the artifacts into Azure Pipelines in a pipeline run, you can see the published artifacts on the details page of this run. The artifact files are stored in a folder that named with the artifact name you specified when publishing the artifact.


1 Answers

Within your build definition, I recommend adding a Copy Files step that will copy your the build artifacts from your msbuild results to the Build's Artifact Staging Directory before you run the Publish Artifact step.

  • Source Folder: $(Build.SourcesDirectory)
  • Contents: **\bin\$(BuildConfiguration)\**
  • Target Folder: $(Build.ArtifactStagingDirectory)

Copy Files Task

I am assuming that the $(BuildConfiguration) variable is custom to your definition and is probably Debug or Release. I am not sure what exactly the Run dotnet step does, but this build definition I setup published my build artifacts correctly. The Publish Build Artifacts step I'm running has the same steps as yours, except the only control option enabled is Enabled.

I am also running on TFS 2015 update 2.

like image 184
Matt Avatar answered Oct 10 '22 17:10

Matt