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 ?
There are 3 different URLs that you can set:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With