I have sln with multiple csprojs. I want to obtain (in artifacts) project UserUi.csproj, which is .NET Framework MVC app (with references to other libraries inside the sln), ready to be copied onto a server.
By running yml:
- master
pool:
vmImage: "windows-latest"
variables:
solution: "**/*.sln"
buildPlatform: "Any CPU"
buildConfiguration: "Release"
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: "$(solution)"
- task: VSBuild@1
inputs:
solution: "$(solution)"
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=FileSystem /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)UserUi"'
platform: "$(buildPlatform)"
configuration: "$(buildConfiguration)"
- task: VSTest@2
inputs:
platform: "$(buildPlatform)"
configuration: "$(buildConfiguration)"
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)UserUi'
ArtifactName: 'drop'
publishLocation: 'Container'
Im getting weird “deploy” files, and UserUi.deploy.zip file which contains proper files, but in a path:
UserUi.zipContentD_Ca1s4. SampleLayerUserUiobjReleasePackagePackageTmp
Why is that? How can i just have a one zip (or normal folder) with PackageTmp contents inside?
I will need to publish this (copy to specified folder) artifacts by using Azure agent installed on server, but with this structure i cant.