1

I'm trying to publish my application using a VS publish profile. When I publish through Visual Studio it works successfully, but through DevOps the publish does not work. The build is successful in both. Here is my VSBuild task definition:

      inputs:
        solution: '$(solution)'
        msbuildArgs: '/t:Restore /p:DeployOnBuild=true /p:DeployDefaultTarget=WebPublish /p:WebPublishMethod=FileSystem /p:PublishBaseUrl=$(build.artifactstagingdirectory)'
        platform: '$(buildPlatform)'
        configuration: '$(buildConfiguration)'
Agreene
  • 508
  • 7
  • 16

2 Answers2

0

Try to use /p:publishUrl instead of /p:PublishBaseUrl. If it still doesn't work, share your pubxml file and DevOps build log.

Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39
0

You are using publish profile, so you could specify the MSBuild argument like this: /p:DeployOnBuild=true /p:PublishProfile=myprofile

Related thread: Using msbuild to execute a File System Publish Profile

starian chen-MSFT
  • 33,174
  • 2
  • 29
  • 53