Deploying Your Application

Visual Studio .NET includes four different Setup and Deployment Project templates:

  • Cab projects Used to package ActiveX components into redistributable cabinet ( .cab ) files for Internet download.

  • Merge Module projects Used to create redistributable packages, including shared components and assemblies. Merge modules must be included in a Setup project to be useful; they cannot be installed on their own.

  • Setup projects Used to create installation packages for Windows applications to be installed on client computer systems.

  • Web Setup projects Used to create installation packages for Web applications to be installed on a Web server.

Visual Studio .NET also includes a Setup Wizard that will help you create any of these four types of setup projects.

Of the four types of projects listed previously, you'll probably only need to create Setup projects for your Windows applications. Cab projects are only useful for legacy ActiveX control support, and Web Setup projects are used for ASP.NET applications. You might make use of merge modules within your Setup projects, but unless you are a component vendor you are unlikely to create a merge module.

After you have created an application and compiled it using the Release option, you can then wrap your application into a Setup project using Visual Studio .NET. You may want to include additional files, such as a license agreement ( License.rtf ) or a Readme file ( ReadMe.rtf ), to provide installation instructions or information concerning the purpose and use of the application. Once all these files have been created, you can create and test a new Setup project by following these steps:

  1. After selecting File, New Project, select Setup and Deployment Projects and then select Setup Wizard. Enter a name and location for the project and then click OK.

  2. In the Setup Wizard, read the Welcome screen and click Next .

  3. Select the option to create a setup for a Windows application and click Next.

  4. Choose the file types to include in your setup. Typically you will want to install the primary output of your application. This is the EXE file that runs the application. You may also choose to install other types of files, such as the localized resources for the application or the source files for the application. Click Next.

  5. The next step of the Setup Wizard allows you to browse to additional files to include in the setup. This is the step where you will add files such as license agreements, Readme files, or help files. Click Next.

  6. Click Finish to create the new setup project.

  7. Now that you've created the project, you can customize it further. To begin with, select the project in the Solution Explorer and provide meaningful information in the Manufacturer, ProductName, and Title properties by using the Properties window for the project.

  8. Build the project to create the setup package. Once you're done, you will find the Setup.exe file, along with the installer package ( .msi ), initialization files ( .ini ), and any additional executables ( .exe ) needed. These files will be located in the \bin\Release folder of the project.

  9. Copy the files from the \bin\Release folder to a machine on which the .NET Framework is installed. You can then install your new application by double-clicking the Setup.exe file. You specify the destination location during the installation.

  10. To uninstall this application from the test computer, you may do so through Start, Control Panel, Add/Remove Programs. Simply select the application from the list of installed packages and click Remove. Being able to remove the application easily and to reinstall it to replace damaged component files are two main benefits of using the Windows Installer to deploy your package.

graphics/note_icon.gif

Deployment of your application requires the .NET Framework, which may be installed from a source such as the Windows Update site. If you want to include a bootstrapper program that can automatically install the .NET Framework if it's not already present, you can download a sample program from http://msdn.microsoft.com/downloads/sample.asp?url=/msdn-files/027/001/830/msdncompositedoc.xml.




Developing and Implementing WindowsR-based Applications with Visual BasicR. NET and Visual StudioR. NET Exam CramT 2 (Exam 70-306)
Developing and Implementing WindowsR-based Applications with Visual BasicR. NET and Visual StudioR. NET Exam CramT 2 (Exam 70-306)
ISBN: N/A
EAN: N/A
Year: 2002
Pages: 188

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net