Search code examples
c#azurevisual-studiopipelineclickonce

Possible to make a ClickOnce application in Azure pipeline from a c# winform project


I have a c# winform project, which is located in an Azure repository.

My goal is to transform it into a ClickOnce application in an Azure pipeline using a build server. There is no enabled Signing or Publish in the *.csproj.

Everything looks good, but when I try to install the application via a link to the deployment application, the following error occurs: "Reference in the deployment does not match the identity defined in the application manifest."

Both manifests have same top public keys. The public key for the in the deployment manifest is set to zero. I'm not sure if this is the root cause and if so, how to fix it?

The job in Azure pipeline looks like this:

  • Fetching certificate
  • Building via MSBuild@1 with option /target:publish
  • Signing via mage.exe deployment manifest (application file), application manifest (exe.manifest file) and executable application (exe.deploy file)
  • Uploading the ClickOnce files to an Azure container

Any idea?


Solution

  • I found the solution with help from the post:

    Updating deployment manifest for a ClickOnce application programmatically results in missing <compatibleFrameworks> element, required in 4.0

    To summery:

    1. Build with t:publish
    2. Remove all the *.deploy extensions
    3. Update the application manifest
    4. Add back all *.deploy extensions
    5. Update the deployment manifest
    6. Upload to Azure container

    Now the application can be installed with only a click at a link to the deployment manifest!