Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clickonce Application file has reference to wrong deployment codebase path

I am using MSBuild to deploy my clickonce WPF app. After deployment, my application clickonce file(Myapplication.application) has the following node

<deployment install="true" mapFileExtensions="true" minimumRequiredVersion="4.9.25.0" co.v1:createDesktopShortcut="true">
    <subscription>
      <update>
        <beforeApplicationStartup />
      </update>
    </subscription>
    <deploymentProvider codebase="file://myapppath/myapplication.application" />
  </deployment>

The code base value is taken from the csproj file's PublishUrl node. However, I supply this value when I publish the project using MSBuild via command line script. Like so

<MSBuild Projects="LTL.SOL.WorkflowDesigner.csproj" Targets="Publish" Properties="PublishDir=$(PublishDir);PublishUrl=http://myapp/;InstallUrl=$(InstallUrl)"></MSBuild>

The path I supply is ignored, and the clickonce picks up the publish URL from the csproj file. Any ideas ?

like image 583
Arshad Mohammad Avatar asked Feb 16 '26 06:02

Arshad Mohammad


1 Answers

There are 3 different URLs that you can set:

  • PublishUrl
  • UpdateUrl
  • InstallUrl

You seem to be setting the Publish and Install URLs to different values, which is OK, but unusual. I would suggest setting all 3 of these to the same value and you should find that will resolve your issue with the deploymentProvider. It's possible your property 'InstallUrl' is empty and causing the unwanted behaviour.

like image 123
Jynx Avatar answered Feb 17 '26 19:02

Jynx



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!