Reputation: 1036
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.
Upvotes: 4
Views: 4310
Reputation: 58980
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.
Upvotes: 3