3

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 ?

2
  • Facing a similar issue. Did you ever resolve this? Commented Dec 1, 2016 at 15:53
  • Unfortunately no. What I ended up doing was that I had the path hardcoded in the .csproj file so that when I deploy, it would pick it up during Build. Commented Dec 6, 2016 at 21:18

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.