C# BootstrapperPackage 在 *.csproj 项目中是什么意思

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2262600/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-07 00:51:17  来源:igfitidea点击:

What does BootstrapperPackage mean inside the *.csproj project

c#visual-studio-2010msbuild

提问by Arve

I am upgrading lots of C# projects from vs.net 2008 to vs.net 2010 rc. I notice that the upgrade creates a BootstrapperPackage section inside the *.csproj file (include Microsoft.NET.Framework.3.5 and 3.5sp1). I wonder what the BootstrapperPackage does and do I need them?

我正在将许多 C# 项目从 vs.net 2008 升级到 vs.net 2010 rc。我注意到升级在 *.csproj 文件(包括 Microsoft.NET.Framework.3.5 和 3.5sp1)中创建了一个 BootstrapperPackage 部分。我想知道 BootstrapperPackage 是做什么的,我需要它们吗?

采纳答案by Hans Passant

Bootstrapper packages are the basic components you might need to get a .NET program installed. You'll find them listed in the BootsTrapper\Packages subdirectory of the Windows SDK folder (c:\program files\microsoft sdks\windows\v6.0 for VS2008). The ones on my machine are:

引导程序包是安装 .NET 程序可能需要的基本组件。您会在 Windows SDK 文件夹(c:\program files\microsoft sdks\windows\v6.0 for VS2008)的 BootsTrapper\Packages 子目录中找到它们。我机器上的是:

  • DotNetFx(Xxx) - installs .NET on the target machine
  • Office2007PIARedist - the Office PIA, required when you automate Office programs
  • ReportViewer - required when you use report viewer
  • Sql Server Compact Edition - required when you use SQL Server Compact
  • SqlExpress - required when you use SQL Express
  • VBPowerPacks - required when you use any VB Power Pack component (PrintForm, Shape etc)
  • vcredist(Xxx) - required when you used any C/C++ code that uses /MD
  • VSTOR30 - required when you used VSTO
  • WindowsInstaller3_1 - installs MSI 3.1 (don't ask)
  • DotNetFx(Xxx) - 在目标机器上安装 .NET
  • Office2007PIARedist - 自动化 Office 程序时需要的 Office PIA
  • ReportViewer - 使用报告查看器时需要
  • Sql Server Compact Edition - 使用 SQL Server Compact 时需要
  • SqlExpress - 使用 SQL Express 时需要
  • VBPowerPacks - 当您使用任何 VB Power Pack 组件(PrintForm、Shape 等)时需要
  • vcredist(Xxx) - 当您使用任何使用 /MD 的 C/C++ 代码时需要
  • VSTOR30 - 使用 VSTO 时需要
  • WindowsInstaller3_1 - 安装 MSI 3.1(不要问)

Making sure that .NET is installed isn't really necessary anymore today. The rest of them might however be required, even if this is a CO install. I think a Setup project can autodetect them reliably.

如今,确保安装 .NET 已不再是必要的了。然而,其余的可能是必需的,即使这是 CO 安装。我认为安装项目可以可靠地自动检测它们。

回答by Arve

OK Found a link. It has something todo with ClickOnce and nothing I need to worry about, I think.

OK 找到一个链接。我认为它与 ClickOnce 有关,我无需担心。

回答by Andrew Russell

<BootstrapperPackage>is the item name for parameters to the BootstrapperItemsparameter of the <GenerateBootstrapper>task, in the default project configuration (ie: Microsoft.CSharp.targets). Check here on MSDNfor the documentation.

<BootstrapperPackage>是任务参数的BootstrapperItems参数项名称<GenerateBootstrapper>,在默认项目配置中(即:)Microsoft.CSharp.targets在 MSDN 上查看这里的文档。

(So the name "BootstrapperPackage" is arbitrary - which is why documentation for it is difficult to find.)

(所以“BootstrapperPackage”这个名字是任意的——这就是为什么很难找到它的文档的原因。)

The GenerateBootstrappertask creates a "setup.exe" that checks for and installs the specified prerequisites before launching another application. Typically that other application will actually be a ClickOnce manifest describing how to install your program.

GenerateBootstrapper任务创建一个“setup.exe”,在启动另一个应用程序之前检查并安装指定的先决条件。通常,其他应用程序实际上是描述如何安装程序的 ClickOnce 清单。

(The ClickOnce manifest gets opened by Windows Installer, which is why you'll typically have that as one of the prerequisites.)

(ClickOnce 清单由 Windows 安装程序打开,这就是为什么您通常会将其作为先决条件之一。)