FROM:http://support.microsoft.com/kb/324733/en-us
------------------------------------------------------------------------------------------------------------------------
This step-by-step article describes how to distribute the .NET Framework with your application.
When you deploy a Microsoft .NET-connected application, the destination computer must have the .NET Framework installed. If the .NET Framework is not installed, the application cannot run. A Microsoft Visual Studio .NET setup and deployment project does
not automatically install the .NET Framework. However, there are ways to make sure that the .NET Framework is installed before your application is installed.
Distribution of the .NET Framework
When you deploy Visual Studio .NET applications, the .NET Framework must be installed on the destination computer. When you create a Windows Installer setup package by using Visual Studio .NET deployment tools, the installer includes a default start
condition (MsiNetAssemblySupport). This start condition verifies that the .NET Framework is installed on the destination computer. If the .NET Framework is not found on the destination computer, the installation is stopped and you receive the following
error message:
This setup requires the .NET Framework. Please install the .NET Framework and run this setup again
You cannot include the .NET Framework in a Windows Installer setup package that you create by using Microsoft Visual Studio .NET deployment tools. The .NET Framework must be installed separately. You can deploy the .NET Framework on the destination
computer in the following two ways:
- Instruct the user to manually install the .NET Framework executable before installing the Visual Studio .NET application.
- Download the Setup.exe Bootstrap sample (available on the Microsoft Developer Network (MSDN) site). Use the Setup.exe to install the .NET Framework redistributable package (Dotnetfx.exe). After the .NET Framework is installed, this Setup.exe starts the
Windows Installer package for your application.
Requirements to Install the .NET Framework
There are basic configuration requirements that must be met to install Dotnetfx.exe. You must have one of the following operating systems and Microsoft Internet Explorer 5.01 or later installed on your computer:
- Microsoft Windows 98
- Microsoft Windows 98 Second Edition
- Microsoft Windows Millennium Edition (Windows Me)
- Microsoft Windows NT 4.0 (Workstation or Server) with Service Pack 6a
- Microsoft Windows 2000 (Professional, Server, or Advanced Server) with the latest Windows service pack and critical updates available from the Microsoft Security Web site
- Microsoft Windows XP (Home or Professional)
- Microsoft Windows Server 2003 family
Depending on your application requirements, install one (or both) of the following:
- MDAC 2.6 or later for data access, available from the Universal Data Access Web site
- Core WMI for Windows instrumentation, available from the Download Center
Install the .NET Framework Manually
- Obtain the .NET Framework redistributable package:
- To download the .NET Framework redistributable package, visit the following Microsoft Web site:
-or-
- Install the redistributable file from the Windows Component Update CD-ROM or DVD-ROM. It is located in the Wcu\dotNetFramework folder.
- Run Dotnetfx.exe to install the .NET Framework.
- If the Visual Studio .NET application requires it, you may add a start condition to the Windows Installed package to verify that MDAC version 2.6 or later is installed.
For additional information about .NET Framework Redistributable location, click the following article number to view the article in the Microsoft Knowledge Base:
308488
(http://support.microsoft.com/kb/308488/EN-US/ )
INFO: Download and Install the .NET Framework
Use Setup.exe to Distribute the .NET Framework with Your Visual Studio .NET Application
You may want to package your application so that the .NET Framework redistributable package is installed first, and then starts the Windows Installer package (.msi file) for your Visual Studio .NET application. The Setup.exe bootstrapping application
is a sample that is available on the MSDN site to demonstrate how to do this. Change the Settings file (Settings.ini) to specify the locations of the redistributable package and your application installer. For more information about how to include the
.NET Framework with your package, visit the following Microsoft Web site:
Prepare Your Deployment Project for Use with the Setup.exe Bootstrapping Application Sample
To use the Setup.exe bootstrapping application sample with an installer that you created by using Visual Studio .NET deployment tools, you must prepare the deployment project for this scenario to work correctly. By default, a deployment project includes
a Windows Installer bootstrapping application. However, the .NET Framework redistributable also includes a Windows Installer bootstrapping application. You must remove the installer bootstrapping application from your project. To do this, follow these
steps:
- In Solution Explorer, click the deployment project.
- On the Project menu, click
Properties.
- In the Property Pages dialog box, set the
Bootstrapper property to None.
- On the Build menu, click Build Solution.
- Copy the Windows Installer file (.msi) to the deployment location (for example, a folder on a CD-ROM or a network share).
- Copy the Setup.exe bootstrapping application sample and the Settings.ini file that you downloaded in the "Use Setup.exe to Distribute the .NET Framework with Your Visual Studio .NET Application" section to the deployment location, and then follow the steps
in the "Customize the Settings.ini File" section
Customize the Settings.ini File
- Open the Settings.ini file in a text editor (such as Notepad).
- Locate the Msi=FxCopSourceSetup.msi entry, and then replace the default path with the path of your .msi file, as in the following examples:
- When mySetup.msi is located on the local computer in the same folder as Setup.exe, the path is Msi=mySetup.msi.
- When the mySetup.msi is located on a network share in a folder named myProjectFolder, the path is Msi=\\myNetworkShare\myProjectFolder\mySetup.msi.
- When mySetup.msi is located in a folder named myInstallerFiles, on the same CD-ROM as Setup.exe, the path is Msi=myInstallerFiles/mySetup.msi.
- Locate the FxInstallerPath=c: entry. Replace the default path with the correct path of the .NET Framework redistributable package, Dotnetfx.exe, as in the following examples:
- When Dotnetfx.exe is located on the local computer in a folder named myProjectFolder, the path is FxInstallerPath=c:\myProjectFolder\.
- When Dotnetfx.exe is located on a network share in a folder named myProjectFolder, the path is FxInstallerPath=\\myNetworkShare\myProjectFolder\.
- When Dotnetfx.exe is located in a folder named myExecutables, on the same CD-ROM as Setup.exe, the path is FxInstallerPath=myExecutables/.
- To verify what build number and language version of the .NET Framework is installed, specify the language in the Settings.ini file. By default, if you do not specify a language for the LanguageDirectory variable, Setup.exe verifies that the English version
is installed.
- Save the Settings.ini file.
分享到:
相关推荐
Microsoft Chart Controls for .NET Framework支持各种丰富的图表选项,包括pie(饼图), area(区域), range(范围), point(点), circular(圆形), accumulation(累积), data distribution(数据分布), ajax ...
The underlying technology platform has migrated from ASP.NET 2.0 to ASP.NET 4.0 and DNN has also integrated Microsoft’s Web API as the service framework at the core of the DNN solution. All of these...
环境:vs2019、.net 4.6。 WinForm窗体程序中使用CefSharp获取加载后的资源、截取request参数、拦截response数据、注入jquery文件和js代码。有问题可联系q369628105
Microsoft Chart Controls for .NET Framework支持各种丰富的图表选项,包括pie(饼图), area(区域), range(范围), point(点), circular(圆形), accumulation(累积), data distribution(数据分布), ajax ...
Microsoft Visual Studio 2005 and .NET Framework 2.0 Samples These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read ...
Annotation Objects (Enterprise Edition Only) - Annotations allow users of Dundas Chart for .NET to add a wide range of different shapes to the chart without the complexity of custom drawing....
However, in the Microsoft Windows and Apple Mac OS X worlds, the dominance of C#/.NET and Objective-C/Cocoa means that Qt is often overlooked. This book demonstrates the power and flexibility of the...
.Net Framework 2.0 or later (for some demo applications) DirectX 9 or later Distribution rights Royalty-free distribution. Trial limitations Trial version overlay a nag-screen over the video window.
.Net Framework 2.0 or later (for some demo applications) DirectX 9 or later Distribution rights Royalty-free distribution. Trial limitations Trial version overlay a nag-screen over the video window.
.Net Framework 2.0 or later (for some demo applications) DirectX 9 or later Distribution rights Royalty-free distribution. Trial limitations Trial version overlay a nag-screen over the video window.
.NET Framework 4.0 (Windows) 或 Mono 运行时 (Linux) Windows Vista 及以上或 Ubuntu 14.04 及以上 Intel Core i5(第一代)或 AMD AthlonII X2 1GB RAM 用于处理 RAW 帧 例子 Internet Friendly Media ...