Arshad Mohammad
Arshad Mohammad

Reputation: 409

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 ?

Upvotes: 3

Views: 876

Answers (1)

Jynx
Jynx

Reputation: 90

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.

Upvotes: 1

Related Questions