简体   繁体   English

Visual Studio ClickOnce部署是否自动包含必要的.NET框架?

[英]Does Visual Studio ClickOnce deployment automatically include the necessary .NET framework?

When using a ClickOnce installer, will it include the necessary .NET framework? 使用ClickOnce安装程序时,它将包括必要的.NET框架吗?

For instance, I want to distribute a WPF application that uses the System.ComponentModel namespace, which wasn't included until .NET 4.5. 例如,我想分发一个使用System.ComponentModel命名空间的WPF应用程序,该命名空间直到.NET 4.5才包含在内。 If I ran the ClickOnce on an older version of Windows that only had up through, say, .NET 3.0, would it still work? 如果我在仅通过例如.NET 3.0的较旧版本的Windows上运行ClickOnce,它仍然可以工作吗?

The click once application will depend on the .NET 4.5 framework. 单击一次应用程序将取决于.NET 4.5框架。 You can include this as a redistributable through project settings -> publish -> prerequisites. 您可以通过项目设置->发布->先决条件将其包含为可再发行文件。 In fact I think recent VS versions will already prepare a setup package to run through installing this during the pre-reqs section of your installer. 实际上,我认为最新的VS版本已经准备好安装程序包,以在安装程序的pre-reqs部分中通过安装该程序包来运行。 You can even alter the location of where the redistributable package comes from. 您甚至可以更改可重新分发软件包的来源位置。

In summary. 综上所述。 It will "work" in that when someone runs your installer it will tell them they don't have the correct pre-reqs, and offer to install .NET 4.5 它会“起作用”,因为当有人运行您的安装程序时,它将告诉他们他们没有正确的先决条件,并愿意安装.NET 4.5

It will, if you install with the setup.exe installer. 如果您使用setup.exe安装程序进行安装,它将进行安装。 I haven't tried it for some time but it always worked like this. 我已经有一段时间没有尝试过了,但它总是像这样工作。

If you link directly to *.application manifest, the .net framework and other dependencies will not be installed automatically. 如果直接链接到* .application清单,则.net框架和其他依赖项将不会自动安装。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM