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
dotnet run
publishing
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
I so hope somebody can point me to a solution. I just can´t understand how hard it is to make this work..
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.
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.
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.
$(Build.SourcesDirectory)
**\bin\$(BuildConfiguration)\**
$(Build.ArtifactStagingDirectory)
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With