Important steps to publish a click once app using Azure

Publish in Azure pipeline:

step 1 Build solution with parameter /target:publish

YAML: #Your build pipeline references an undefined variable named ‘Parameters.solution’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972

#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

#Your build pipeline references the ‘BuildConfiguration’ 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 **\*.sln’

  inputs:

    solution: ‘$(Parameters.solution)’

    msbuildArgs: ‘/target:publish’

    platform: ‘$(BuildPlatform)’

    configuration: ‘$(BuildConfiguration)’

Step 2: Copy artifact files to publish folder