Setting up your VS project (WPF, Win and Console) for click once deployment.
Before you deploy the Windows application, you set properties for Security and Publish from the application's Properties window.
The Security property sets the permissions for your application. By default, the ClickOnce deployment has a limited subset of permissions. You can set the permissions to deploy only to client machines on the Intranet or Internet, or to allow full permissions.
The Publish property sets the deployment location to a Web Site URL, an FTP server, or a file path. Also, this property sets necessary prerequisites and updates to the deployed application.
To set the ClickOnce Deployment Options.
1. In the Solution Explorer, right-click the bold project name, and click Properties.
2. Click on the Security tab.
3. Select Enable ClickOnce Security Settings.
By default, the ClickOnce security permission is set to: This is a full trust application.
4. Click on the Publish tab, and then click Prerequisites.
5. Here you can set any prerequisites for theprogram.
Note Encourage your clients to install the .NET Framework or any other runtime before you deploy the Windows application, because installation time increases significantly if you use ClickOnce to install the prerequisites.
6. Click OK.
7. On the Publish tab, click Updates. From the Application Updates dialog box, ensure the following options are selected:
a. Select: The application should check for updates.
b. In the Choose when the application should check for updates list, select: Before the application starts.
8. Click OK to close the dialog box.
9. From the File menu, click Save All.
To publish a Windows application.
1. In the Solution Explorer, right-click the bold project name, and click Publish.
2. Choose where to publish the application.
3. Choose the location where the users will install the application from (Use the same location but provide the UCN path name (Do not use mapped drive names-see example below)).
4. Choose the first option that the application is available offline.
5. Click finish
Installing the application on a client.
1. Go to the installation directory and click on the setup.exe.
2. Click run
3. Click on install.
4. The application is automatically opened.
Deploying a new version
1. Raise the assembly version.
2. Republish the files (Same flow as described in previous chapter).
3. Open the program on the client
4. Choose whether to update to the new version or keep working with the current version.
5. If you click skip, the next time you open the program, it will not ask to be updated again until a newer version is deployed or a republish is done of the current version. You can configure a minimum version, if the client version is below the minimum version, the update will occur without asking the client to Skip or press OK.
6. If you click OK then the new version is installed and opened.
Uninstalling the application
1. Remove the application using the windows program management
2. You can also restore the application to a previous version.