13.4. Distributing InfoPath .NET applications

While distributing .NET applications with InfoPath forms is not any different from distributing other .NET applications, as with those types of projects you will want to make sure that you build your project in release mode. There are a couple of options you can use to distribute your application.

The first option is simply to copy the objects in the Bin folder to a folder you want to use. If you are just storing the application on a LAN this is a good option. The other option is to create a distributable runtime setup program for your application. To do this use the Setup type Visual Studio .NET project.

You can create setup applications for installing from the Web or Windows desktops, creating downloadable .cab files, or merge modules, which work with the Windows installer.

The setup project you will use is a wizard that walks you through specifying the files you need to include, located in the Bin folder of your InfoPath .NET project.

13.4.1.

13.4.1.1. Try It Out: Creating the Setup Distribution Project

For the purpose of this Try It Out, you will be using the InfoPath .NET application that you created in the last exercise. In the project you just created:

  1. Choose Release for the Solution Configure drop-down list, displayed on the toolbar. The drop-down list most likely displays Debug currently.

  2. Click BuildRebuild Solution to create a Release version of the project. VS will then create the necessary files in a folder called Bin under your project folder.

  3. Choose FileClose Solution to close the current solution.

  4. Click New Project. The New Project dialog box will open.

  5. Click on the Setup and Deployment Project node in the Project Types tree view. The various types of setup templates will be displayed.

  6. Click on Setup Wizard, and then type in the name of the new project as you want it, as shown in Figure 13-16.

    Figure 13.16. Figure 13-16
  7. Click OK to start the Setup Wizard. The first page of the wizard will appear, as shown in 13-17.

    Figure 13.17. Figure 13-17
  8. Click Next to move on to the next page. The next page displays a dialog box asking which kind of setup application you want to create, as described in the introduction before this Try It Out. You can see the defaults in Figure 13-18.

    Figure 13.18. Figure 13-18
  9. Click Next to accept the defaults. The next page of the wizard lets you specify which files you want to include.

  10. Click Add. The Add Files dialog box will appear. Using this standard open file dialog box you can locate and select all the files you want to include in the setup.

  11. Locate and highlight all the files in the Bin folder of the project. You can see from Figure 13-19 that there are only two files necessary.

  12. Click Open after highlighting both files. You will then see the files listed on the third page of the Setup Wizard, as shown in Figure 13-20.

    Figure 13.19. Figure 13-19

    Figure 13.20. Figure 13-20
  13. Click Next to display the last page of the Setup Wizard. This page, shown in Figure 13-21, displays summary information about the setup project.

    Figure 13.21. Figure 13-21
  14. Click Finish to create the setup project. The project will be created, and you will be placed in Visual Studio with the project displayed. There are a lot of features you can set up using the project, but for your purposes you simply need to build the release version of the setup program.

  15. Choose Release from the Solution Configure drop-down list, as displayed on the tool bar.

  16. Select BuildRebuild Solution. The release version of the setup application is created. If you look in the Release folder, located in the main setup project folder, you will see the files shown in Figure 13-22.

    You can now either burn the files to a CD, or put the project out on your local area network.

  17. Click on Setup.exe to start the installation program. The first page of the installation program will be displayed as shown in Figure 13-23.

    You can then walk through the rest of the steps for installing the application.

    Note that users still have to have a full copy of InfoPath installed on their system.

    Figure 13.22. Figure 13-22

    Figure 13.23. Figure 13-23
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.170.206