天天看點

在.Net安裝檔案中包含.Net Framework和MDAC 2.7

在這裡下載下傳“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.

繼續閱讀