在.Net安装文件中包含.Net Framework和MDAC 2.7

来源:互联网 发布:淘宝适合卖什么 编辑:程序博客网 时间:2024/04/28 00:00
这里下载“Microsoft Visual Studio .NET 2003 引导程序插件”。

通过 Microsoft Visual Studio .NET 2003 引导程序插件,您可以轻而易举地创建安装程序,将 .NET Framework 1.1 和/或 MDAC 2.7 随您的应用程序一起重新分发。
为使 .NET Framework 应用程序可以在某台特定的计算机上运行,该计算机上必须安装有 .NET Framework。 任何使用 ADO.NET 来连接数据库的 .NET Framework 应用程序都要求使用 MDAC 2.7。 许多计算机都已经安装了这些组件,但是,为了确保某个应用程序能够运行,应随该应用程序重新分发这些组件。
Visual Studio .NET 2003 引导程序与 Visual Studio .NET 安装程序和部署项目集成在一起。 基于这一点,您可以只创建一个安装程序,用它来自动检测目标计算机上是否存在那些系统必备软件,并根据需要进行安装。 如果在安装任何组件的过程中要求计算机重新启动,安装程序将会自动继续后续的安装操作。 因此,应用程序的用户只需要运行一个安装程序即可安装系统必备软件和相应的应用程序。
若要了解有关 Visual Studio .NET 2003 引导程序的更多内容,请参阅《.NET Framework 1.1 开发指南》中的 Visusal Studio .NET 2003 文章

部分内容节选:

Setup projects in Visual Studio .NET 2003 can be used to install the .NET Framework with your application, but only if you have installed the optional Visual Studio .NET Framework Bootstrapper Plug-in on your development computer.

Note   The Visual Studio .NET Framework Bootstrapper Plug-in is available for download from the Download Center.

The Visual Studio .NET Framework Bootstrapper Plug-in modifies the behavior of the Setup project's Bootstrapper property to include the .NET Framework bootstrapper as well as the Windows Installer bootstrapper. The .NET Framework redistributable and the appropriate Language pack are then packaged with your application; a launch condition checks for the correct version of the .NET Framework at install time and if necessary, installs it before installing your application.

Note   The Visual Studio .NET Framework Bootstrapper Plug-in doesn't modify the Web bootstrapper. Setting the Bootstrapper property to Web Bootstrapper will only install the Windows Installer Bootstrapper.

In addition, if your application requires data access, you can install the Microsoft Data Access Components (MDAC) with your setup.

The Visual Studio .NET Framework Bootstrapper Plug-in also supports installing localized versions of the .NET Framework for each of the eight languages supported by Visual Studio .NET. You must install a separate version of the plug-in for each language that you wish to support; these can be downloaded from the same location as the English version. The Localization property of the Setup project determines which version of the framework will be bootstrapped. For more information, see Installing Localized Applications.

To make sure that the plug-in is installed

  1. From the Control Panel, click on Add or Remove Programs.
  2. In the Add or Remove Programs dialog box, check the Currently installed programs list for Microsoft Visual Studio .NET 2003 Bootstrapper Plug-in.

If Microsoft Visual Studio .NET 2003 Bootstrapper Plug-in is not listed, you will need to download and install the Visual Studio .NET Framework Bootstrapper Plug-in from the Download Center.

Note   You can also uninstall the Visual Studio .NET Framework Bootstrapper Plug-in by selecting it from the list and clicking Remove.

To install the .NET Framework with a Setup project

  1. Make sure that the Visual Studio .NET Framework Bootstrapper Plug-in is installed.
  2. Select the Setup project in Solution Explorer. On the Project menu, choose Properties.
  3. Set the Bootstrapper property to Windows Installer Bootstrapper.

    The .NET Framework redistributable will be packaged with the Setup.exe for the Setup project when it is built.

    Note   The .NET Framework launch condition must also be enabled; it is enabled by default for any project that references the .NET Framework. To check for the launch condition, from the View menu, point to Editor and choose Launch Conditions, then look for a launch condition named .Net Framework.

To install MDAC with a Setup project

  1. Make sure that the Visual Studio .NET Framework Bootstrapper Plug-in is installed.
  2. Select the Setup project in Solution Explorer. From the View menu, point to Editor and choose Launch Conditions.
  3. Select the Requirements on Target Machine node. From the Action menu, choose Add Registry Launch Condition.
  4. Select the Search for RegistryEntry1 node. In the Properties window, select the RegKey property and type Software/Microsoft/DataAccess.
  5. Select the Root property and select vsdrrHKLM.
  6. Select the Value property and type FullInstallVer.
  7. Select the Property property and type MDACSEARCH.
  8. In the Launch Conditions Editor, select the Condition1 node. In the Properties window, select the Condition property and select MDACSEARCH>="2.6".
  9. Select the Setup project in Solution Explorer. On the Project menu, choose Properties.
  10. Set the Bootstrapper property to Windows Installer Bootstrapper.

    Both the .NET Framework redistributable and MDAC will be packaged with the Setup.exe for the Setup project when it is built.

 
原创粉丝点击