How to Publish a ClickOnce application with Azure DevOps Pipeline on different environments?

前端 未结 1 693
一个人的身影
一个人的身影 2021-01-12 19:37

I try for several days now to publish my ClickOnce application with Azure DevOps Pipeline. Before going in detail here is what I would like to do from my release view:

相关标签:
1条回答
  • 2021-01-12 20:21

    finally I could solve this by adding a file transform before my build.

    In case you need more help here is my YAML detail for transformation

    steps:
    
    - task: FileTransform@1
    
      displayName: 'File Transform: '
    
      inputs:
    
        folderPath: App.Example
    
        enableXmlTransform: true
    
        xmlTransformationRules: '-transform **\*.Staging.config -xml **\*.config'
    
        fileType: xml
    
    
    #Your build pipeline references the ‘BuildPlatform’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
    
    
    
    steps:
    
    - task: VSBuild@1
    
      displayName: 'Build solution'
    
      inputs:
    
        solution: Example.sln
    
        msbuildArgs: '/target:publish /p:ApplicationVersion=$(Build.BuildNumber) /p:PublishURL=http://staging.example.com/   /p:UpdateEnabled=true  /p:UpdateMode=Foreground  /p:ProductName="App Staging" /p:OutputPath="$(build.ArtifactStagingDirectory)\Publish\\"'
    
        platform: '$(BuildPlatform)'
    
        configuration: Staging
    
    0 讨论(0)
提交回复
热议问题