0
votes

We are using Devops 2019 and have build setup using on-premise agent, We have a .net solution file which contains both console and web application code. Each time When pull request build runs, Build Drop file contains only Console application specific drop code files but not web applications\service specific drop. Below are MSBuild Arguments /p:DeployOnBuild=true /p:WebPublishMethod=FileSystem /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\" Tried below, yet nothing worked out
VSTS Build Not Dropping All Files for Web Application

1
Hi Did you get a chance to check out below answer? Please let me if it helped you to fix this issue.Levi Lu-MSFT
It helped me to some extent, Yet am unable to generate files like the way we get when we publish from VS2019Venkat

1 Answers

0
votes

You can try using property(/p:outputpath=$(Build.ArtifactStagingDirectory)\) to the Msbuild Arguments. See below:

/p:DeployOnBuild=true /p:WebPublishMethod=FileSystem /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:outputpath=$(Build.ArtifactStagingDirectory)\

If /p:outputpath is not working. Please go to the build log of the Build task(eg. Visual Studio Build task) to see if the web application is built successfully. And check where the build result of web application is output. And then you can use Copy files task to copy the build results of web application to the folder $(build.artifactstagingdirectory) to be published by publish build artifacts task.