In this lab, you will publish an application to a network share using ClickOnce. You will create a shared folder on your computer, configure that install and those download locations, and then publish the application and download it using ClickOnce.
NOTE Exercise prerequisites
Your computer must be on a network, or you must have run network setup to complete this lesson.
► Exercise 1: Publishing an Application to a Network Share
1. In the root directory, create a shared directory named C:\ClickOnce.
2. From the Code folder on the companion CD, open the partial solution for Chapter 15, "Deployment." Note that you will use the same partial solution for both Lesson 1 and Lesson 2.
3. In Solution Explorer, right-click the project and then click Properties. Select the Publish tab.
4. In the Publish Location group, set the Publishing Location to C:\ClickOnce.
5. Also in the Publish Location group, set the Installation Location to \\[computer-name]\ClickOnce, where [computername] is the name of your computer.
6. Click Publish Now to publish your application to the network share. ClickOnce verifies application requirements and publishes the application. The Pub-lish.htm file opens.
7. Open the C:\ClickOnce folder and then double-click Setup. You might see a security warning; if so, click Install. The application is installed and opens on your computer. Notice that a new group is added to your Start menu.
8. From the Windows Start menu, open the Control Panel and select Add/Remove Programs. Click the icon for your application and select Change/Remove. Follow the on-screen instructions to remove the application from your computer.
Was this article helpful?