Visual Studio 2010 能否设置和部署 MSI 安装程序以通过客户端运行 .NET 4.0 完整应用程序?
我的应用程序(不幸的是)需要完整的 4.0 .NET 框架。看来无法通过 Visual Studio 设置和部署项目来创建和发布单个文件来确保最终用户下载并安装完整的 .NET 版本。 MSI 会误导用户下载客户端版本,并使用户陷入“此安装需要 .NET Framework 版本 4....NET Framework 可以从 Web 获取。您现在想这样做吗?”的无限循环。 ”
或者,运行 setup.exe 可以满足我的需要(即确保从网络上完全安装 .NET 4.0),但强行向用户强加两个文件来安装我的软件对我来说是不可接受的(并且任何试图让skittish客户保持简单的人)。
那么.NET MSI 安装程序对于需要完整版本的应用程序毫无用处吗?
(哦,还有 Microsoft 带来的另一件快乐:Microsoft 已向其员工发誓对 .NET 4.0 Web 安装程序的版本保密。我仅根据经验知道它是客户端版本)。
My application (unfortunately) requires the full 4.0 .NET framework. It appears there is no way through the Visual Studio setup and deploy projects to create and post a single file that ensures end users will download and install the full .NET version. The MSI will mislead users into downloading the client version and put the user into an endless cycle of "This setup requires .NET framework version 4 ... The .NET framework can be obtained from the web. Would you like to do this now?"
Alternatively, running setup.exe
will do what I need (that is, ensure .NET 4.0 full installs from the web), but imposing two files on a user to install my software is unacceptable to me (and anyone trying to keep things simple for skittish customers).
So is the .NET MSI installer useless for applications that require the full version?
(Oh and another piece of joy from Microsoft: Microsoft has sworn their staff to secrecy as to what version results from the .NET 4.0 Web installer. I only know from experience it's the client version).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该问题是由“启动条件”引起的...当您执行“添加启动条件”时,它不会费心检测项目/“主要输出”正在使用的框架“配置文件”...并且始终默认为指向“.NET Framework 4 客户端配置文件”和
InstallURL = http://go.microsoft.com/fwlink/?LinkId=131000
的条件。因此,当您需要安装程序依赖于“.NET Framework 4 Full Profile”时,请将
Version
属性更改为“.NET Framework 4”,并确保手动更新InstallUrl< /code> 到
http://go.microsoft.com/fwlink/?LinkId=186913
,因为它无法在应该更改的 Url 时进行更改。然后,这会将他们带到带有“完整配置文件”.NET 4 Framework(而不是“客户端配置文件”)的“Web 安装程序”的网页。
您也可以将“完整 .NET 4 独立/离线安装程序”的
InstallURL
设置为http://go.microsoft.com/fwlink/?LinkID=186916
。还值得更改安装项目中的先决条件。
The problem is caused by "Launch Conditions"...when you do "Add Launch Condition" it doesn't bother to detect the framework "profile" being used by your Project/"Primary Output"....and always defaults to a condition that points to ".NET Framework 4 Client Profile" and
InstallURL = http://go.microsoft.com/fwlink/?LinkId=131000
.So when you need your Setup to have a dependency on the ".NET Framework 4 Full Profile" change the
Version
property to ".NET Framework 4" and make sure you manually update theInstallUrl
tohttp://go.microsoft.com/fwlink/?LinkId=186913
, because it fails to change the Url when it should.This will then take them to the web page with the "Web Installer" for the "Full Profile" .NET 4 Framework, rather than the "Client Profile" one.
You could alternatively set
InstallURL
tohttp://go.microsoft.com/fwlink/?LinkID=186916
for the "Full .NET 4 Standalone/Offline Installer".It's also worth changing the Prerequisites in your Setup project.
尝试在项目设置中更改 MSI 的“启动条件”:
当我这样做时,我是定向到 .NET Framework MSDN 上的 Visual Studio 区域其中包含 .NET 4 Web 安装程序 (
dotNetFx40_Full_setup.exe< /代码>)。
更复杂的解决方案是将
dotNetFx40_Full_setup.exe
与 MSI 文件一起提供,并在安装过程中自行检测框架版本,并在需要时运行setup.exe
;安装框架后,您将继续安装。Try changing the "Launch Conditions" of the MSI in the project settings:
When I did that, I was directed to .NET Framework on the Visual Studio area on MSDN which has a link to the .NET 4 web installer (
dotNetFx40_Full_setup.exe
).A more involved solution would be to ship
dotNetFx40_Full_setup.exe
with your MSI file and detect the framework version yourself during the install process and run thesetup.exe
if required; you would then continue with your install when the framework is installed.