Quv
Quv

Reputation: 3139

How to change Deployment Provider url in ClickOnce's manifest file?

(Disclaimer: I use the Japanese version of Visual Studio 2005, and while I'm literally translating the menu names of my Visual Studio into English, it's likely to be different than how they're actually on the original edition)

Anyways, I'm trying to publish a ClickOnce app on the server, but the generated manifest file (.application) has a value in the deploymentProvider codebase attribute that I can't change at all.

<deploymentProvider codebase="http://foo.jp/foo/ClickOnce/fooApp.application" />

I expected the value would be changed by putting a path into the box where we could specify the location path (I mean, Solution Explore -> Property -> Publish tub -> Publish Location), but do I overlook something else?

Of course, I can manually change it on my NotePad, but I don't think it's the normal behavior!

Upvotes: 11

Views: 20004

Answers (6)

Kevin Piatt
Kevin Piatt

Reputation: 61

I thought it might be worth adding the approach we used to accomplish this through DevOps. The process still utilizes mage as Glenn Ferrie referenced above.

If you are signing the application this process must be done prior signing.

You will add a Command Line task to your Agent Job. Name the task as you see fit, and set the script as follows (updating any paths or variables as needed):

$(Mage)\mage.exe -Update $(app.publish)\fooApp.application -pu http://foo.jp/foo/ClickOnce/fooApp.application

I will note that we also had to update the bootstrapper for our needs as well. That is outside the scope of the question here, but for those that need to update the bootsrapper URL we used the following procedure in DevOps.

We added a separate Command Line task with the following script (again, update your names and paths/variables as needed):

$(app.publish)\setup.exe -url="http://foo.jp/foo/ClickOnce/"

Upvotes: 0

EllieK
EllieK

Reputation: 273

I'm using VS 2017.

  • Go to Project Properties

  • Select the Publish page

  • Select the Updates... button

  • Change the Update Location at the bottom of the page to match your new location

Upvotes: 5

user3152232
user3152232

Reputation: 1

you need to pass both /property:InstallURL and /property:UpdateEnabled=true to set the deploymentProvider

Upvotes: 0

Bastien Vandamme
Bastien Vandamme

Reputation: 18465

After doing some test I found this is InstallURL property. With MSBuild you can use

/p:InstallURL=http://www.http://foo.jp/foo/ClickOnce/

or you can open your csproj file and add the InstallURL in the correct section. I cannot really help on this part because I use the command line feature.

And here is the full command line I use to build my application for ClickOnce deployment with Azure DevOps.

/target:publish 
/p:ApplicationVersion=$(Build.BuildNumber) 
/p:InstallURL=http://install-staging.newsprintgroup.com/ 
#/p:PublishURL=http://install-staging.newsprintgroup.com/ #This one is not working for me
/p:UpdateEnabled=true 
/p:UpdateMode=Foreground  
/p:ProductName="App Staging" 
/p:OutputPath="$(build.ArtifactStagingDirectory)\Publish\\" #With the double backslash

Upvotes: 0

Glenn Ferrie
Glenn Ferrie

Reputation: 10390

enter image description here

Navigate to the Project Properties (dbl-click on 'Properties' in the Solution Explorer).

Go to 'Publish' tab. Edit Configuration.

(see screenshot)

Upvotes: 2

Glenn Ferrie
Glenn Ferrie

Reputation: 10390

There is a utility called Mage or MageUI that Microsoft provides to edit and managing the manifest for clickonce deployments. I've primarily used it to change and re-sign apps that I needed to deploy in a remote location.

link: http://msdn.microsoft.com/en-us/library/xhctdw55(v=vs.80).aspx

Upvotes: 2

Related Questions