mansellan / clickonce

ClickOnce packager
Other
26 stars 7 forks source link

TimestampUrl is an invalid URL when this argument is empty #32

Closed dvoituron closed 3 years ago

dvoituron commented 3 years ago

Hello... Thanks for this greate AzureDevOps extension.

I've a problem when using a certificate with a Thumbprint, but without Timestamp URL. I've received an error Error setting value to option 'timestampurl': Invalid URI: The format of the URI could not be determined. because the argument --timestampUrl is set.

Can you remove this parameter if the timestampUrl is empty?

Thanks

Find here the Yaml used.

steps:
- task: mansellan.clickonce.clickonce-task.clickonce@1
  displayName: 'ClickOnce Package'
  inputs:
    source: '$(System.DefaultWorkingDirectory)/drop'
    target: '$(System.DefaultWorkingDirectory)/Publish'
    product: 'MyProduct'
    version: '$(Build.BuildNumber)'
    publisher: MyCompany
    createDesktopShortcut: true
    deploymentUrl: 'https://mywebsite.net/'
    targetFramework: net48
    prerequisitesMode: vendor
    prerequisite1: '.NETFramework,Version=v4.8'
    signingMode: installed
    thumbprint: 84599cec4d8b0d567b819a3eb75a100749b8f155
    verbosity: verbose 
mansellan commented 3 years ago

Thanks for reporting this - I'll try to get a fix sorted soon

sschopen-i2s commented 3 years ago

I have fixed it in my local TFS/Build-Server by modifying the clickonce.js/.ts.

I replaced

toolRunner.arg(["--timestampUrl", tl.getInput("timestampUrl")]);

with

if (tl.getInput("timestampUrl")) {
   toolRunner.arg(["--timestampUrl", tl.getInput("timestampUrl")]);
}

Lines 121 and 130. The parameter will be removed from the commandline when empty which is working perfectly fine. Would be very nice to have this resolved in the TFS extension in the marketplace.

Thanks.

mansellan commented 3 years ago

Auto-closed by PR - reopening until deployed

mansellan commented 3 years ago

This has been deployed to the Marketplace