Welcome to WindowsClient.net | My Blog | Sign in | Join

Windows Client Videos

Deploying a Standard WPF Application Using ClickOnce and Visual Studio

ClickOnce deployment, introduced in .NET 2.0, is just one of the deployment strategies used to deploy WPF applications.  This presentation demonstrates how to deploy a WPF application and deploy updates to that application using ClickOnce deployment.  Visual Studio’s Publish Wizard is used to create the ClickOnce deployment.

Author: Todd Miranda

Posted: Oct 04 2007, 12:45 AM by jaytayl | with 5 comment(s)
Filed under:

Comments

Land99 said:

First, may I say that your WPF videos have been exceptional and informative!

But this one (ClickOnce) was confusing.  I'm particular puzzled by the terminology.  Am I correct in assuming we have the following distinct "locations"?

Loc1: The directory location of your raw WPF application.

Loc2: A directory location (and/or web location) that contains files you use to "publish" your application.  The Publish Wizard takes your Loc1 files and generates files in Loc2.  I gather the main page for Loc2 is usually "publish.htm".

Loc3: The site a public user would go to to "get" your aplication.  The contents of Loc3 is generated by going to the publish.htm page in Loc2 and executing the functionality there.

Loc4: The public user's PC.  The user "accesses" or "pulls down" your application from Loc3 by aiming his/her browser to Loc3.

Some sort of graphic right at the beginning showing these locations, each with a clear label used consistently throughout the presentation, would have been very helpful!

PLease straighten me out on this if I have it wrong!

# April 14, 2008 9:20 AM

tmiranda said:

Great question.  And the confusion is partially due to my wanting to present it in a way different than many examples of ClickOnce.

Your location descriptions are correct with the following caveats:

Loc 1: correct, this is the development location if we could call it that.  This is the location of that your development work is done in.

Loc 2: correct, this is the publish location.  Keep in mind that you can publish to a local folder, a network drive, or even Loc 3 (meaning you can publish directly to the location the user will go to to "get" the application.  Often times, you will publish directly to this location.  However, there are times when the actor (I don't want to use the word "user" here) performing the application build does not have access to the location referred to by Loc 3.  Thus why I chose to publish to an intermediary location (Loc 2).  Publish is simply a page provided which allows the user to click on one button to get the latest version of your application.  Technically, you could direct the user straight to the version of the application you would like.  Finally, Loc 2 will include the application files, the manifest assemby files (which contains information telling ClickOnce which files are necessary to be downloaded), and the web page (publish.htm).

Loc 3: This is the location where the user would go to download the ClickOnce application.  Keep in mind that nothing here is dynamically generated.  All files in this location are static.  So it's contents are not generated by publish.htm (just linked to).  Also keep in mind that this location (Loc 3), could be a network drive as well.  It does not have to be a url on the web.

Loc 4: correct.

Finally, one last note about Loc 3.  While progressing through the publish wizard in Visual Studio, you can specify a different location for the installation and the update urls.  We said that Loc 3 is the location the user goes to in order to install the application.  You can choose to set up a different location for ClickOnce to retrieve updates to the application.  You might do this, for example, in the situation where you want more control over access to updates.

Let me know if this makes things more clear.

Todd

# April 15, 2008 12:58 PM

Land99 said:

Thanks for the prompt clarification.  That helped a lot!

# April 15, 2008 10:05 PM

donnelcyril said:

Hi,

I am trying to deploy an application using one touch deployment.

As explained in most of the references, I created a virtual directory and set the output path of my application to it.  But when I try something like this:

http://localhost/MyApps/MyApps.exe">localhost/.../MyApps.exe, the application doesn't  pop up and the browser remains blank.

I am running IE 6, which I believe is sufficient for NTD.

I first thought it would be a security issue and my code wouldnt be having permissions to run on the local machine.

I created and installed two policy deployment package, one in which the membership condition is a strong name and the other one a URL based, (like http://localhost/*) giving the code full permission, but sadly that didnt work.

I have changed the virtual directory permissions to script only.

Please help, I badly need to fix this out..

# December 31, 2008 10:49 PM

Oneida said:

Hey. Be a good listener. Your ears will never get you in trouble.

I am from Northern and learning to read in English, tell me right I wrote the following sentence: "Skyscanner ues search engine technology to obtain ticket information from airline websites."

With best wishes 8), Oneida.

# April 3, 2009 10:58 PM