I am fairly new to Azure Build pipelines, but I am having issues finding the answer to this.
When I build my artifact, the results include my server code files (vb and cs). How do I construct a build pipeline where the artifacts that are dropped are only the files I need to publish a site? Meaning, I want to exclude vb and cs files, but include necessary dll's and html/java script files.
You're publishing the wrong thing as an artifact. You're probably specifying $(Build.SourcesDirectory)
or $(System.DefaultWorkingDirectory)
as the root folder for your artifacts.
Look at your build step. Are you specifying an output directory as an MSBuild argument? If not, specify one. Specifically, $(Build.ArtifactStagingDirectory)
. So you'd pass the MSBuild argument /p:OutDir=$(build.artifactstagingdirectory)
Then publish $(Build.ArtifactStagingDirectory)
instead of whatever folder you're currently publishing.
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