I.T. Discussion Community!
-Collapse +Expand
C#
Search C# Group:

Advanced
-Collapse +Expand C# To/From
To/FromCODEGuides
-Collapse +Expand C# Study Test
PRESTWOODCERTIFIED
-Collapse +Expand C# Store
PRESTWOODSTORE

Prestwood eMagazine

October Edition
Subscribe now! It's Free!
Enter your email:

   ► KBProgrammingC#   Print This     
Next Random Article Next Random Tidbit || Change Topic Random From All
  From the August 2015 Issue of Prestwood eMag
 
C#:
Deploying your .NET Application with ClickOnce (quick tutorial)
 
Posted 12 years ago on 3/30/2007 and updated 1/30/2009
Take Away: A basic introduction to deploying an application using Visual Studio .NET 2005's ClickOnce

KB100507

One description I found for ClickOnce is: a smart client deployment technology in the Microsoft .NET Framework 2.0 that brings the power and ease of Web deployment to Windows Forms and console applications.

So if your application’s installation does not require writing to the registry, installing services, or things of that nature, ClickOnce might be right for you. A quick run through of deploying your application is below.

Within your Visual Studio .NET 2005 project (mine is a simple, one form test app named ClickOnceTest), right click on your project in the Solution Explorer and click on Properties. Once the properties screen appears click on the Security tab and click “Enable ClickOnce Security Settings.”

Then click on the Publish tab. Here you will input where you would like to publish your application, the installation URL, and the prerequisites for your application. In this case I will be publishing to one of our FTP servers here at Prestwood (I have blanked out the path to the actual directory on the server), but you could publish to a network share, file system or a FrontPage web.

The prerequisites button will produce a form where you can specify items that need to be installed prior to your application being installed, such as the .NET framework, MDAC, SQL Server Express, etc.

Once you have all your information entered, you can click on the Publish Now button. If the location where you are publishing to requires a login (such as the ftp server in my case), you will be prompted at to enter that information at this point.

Upon successful publish, the default location will be http://<your installation URL>/publish.htm

And in our case here:

http://clientftp.prestwood.com/clickonce/publish.htm

Additional information about ClickOnce can be found here:

http://msdn2.microsoft.com/en-us/netframework/aa497348.aspx

This was of course a quick introduction to ClickOnce, and there are definitely different settings that can be used with your deployment.

Hope this helped!


Comments

1 Comments.
Share a thought or comment...
Comment 1 of 1

Great article!

I tried to publish one of my applications as ClickOnce and instantly ran into one problem: I am using the configSource parameter in my app.config file to point to another file (dev,test,prod configs) and when running the application it did not find these config files.

Similarly, if I skipped this attribute and put all my settings in one config file, it did not find an application style library that is stored in a subfolder "Styles", even though this file and the config files are marked with the "copy always" or "copy if newer" attributes.

Is there a way to specify which files (other than application files), can be included in the setup?

Markus

Posted 10 years ago
 
Write a Comment...
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1223A1
Enter key:
KB Post Contributed By Adam Lum:

Adam Lum is a part time developer for Prestwood Software and participates in this online community when time allows. His day-to-day work is C# coding but his current intrests (right now) are Ruby on Rails and iOS programming with Objective-C.  He has also coded several projects in Java, C++, ASP Classic, and PHP.  His personal website can be found at adamlum.com.

Visit Profile

 KB Article #100507 Counter
41862
Since 4/2/2008

Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech