ClickOnce Deployment
ClickOnce deployment lets users install your application via a link on your website. You get the benefit of not having to install your application on multiple computers across your company. You copy the ClickOnce deployment package to a designated web page on the company web server and link to that page. Updating your application is simply a matter of copying the new deployment package to the server and letting your users know that they need to get the latest copy. You also have the option to have your application check for updates online and install them automatically. ClickOnce deployment makes it much easier to manage your release cycle.
To implement click-once deployment for your application, first open the application in design mode. Right-click on the project name and select Properties. Along the left-hand side are a series of tabs. Click on the Security tab and select Enable ClickOnce Security Settings. This is shown in Figure 19-10.
Figure 19-10. Enable ClickOnce Security Settings checkbox.
Secondly, select the Publish tab at the bottom and click the Prerequisites button to the right. This gives a list of prerequisites that need to be installed with your application. Make sure that “.NET Framework 3.5” and “Crystal Reports Basic for Visual Studio 2008” are checked. This is shown in Figure 19-11.
Figure 19-11. Selecting the proper prerequisites.
Click the OK button to save your changes.
If you’re using Visual Studio 2005, select the following prerequisites: “.NET Framework 2.0” and “Crystal Reports for .NET Framework 2.0”.
Click the Updates button at the right and select the options “The application should check for updates” and “Before the application runs”. This tells the application to check for updates each time the application runs.
To publish your application to the web server, save your changes and right-click on the project name and select Publish. This opens the Publish Wizard, which walks you through the process of specifying where to deploy your application. It prompts you for the location and asks if the files should be available both online and offline. If installed online, the applicaton is run directly from the link on the web page. If installed offline, the application is added to the Start Menu and the user can uninstall it with the Add/Remove Programs tool.
After publishing it to the web server, it’s best to double check that the page is setup correctly and that the link works as expected.
The .NET Framework and Crystal Reports redistributable package require a very large amount of bandwidth to download from the web server. For optimum performance, your users should download and install the .NET Framework and Crystal Reports redistributable package in advance. This is much more efficient because ClickOnce deployment is smart enough to recognize which prerequisites are already installed on the client machine and not download them a second time.