开发者

Can Visual Studio 2010 setup and deploy the MSI installer to work for .NET 4.0 full applications over client?

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 re开发者_如何学Gosults from the .NET 4.0 Web installer. I only know from experience it's the client version).


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 the InstallUrl to http://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 to http://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.

Can Visual Studio 2010 setup and deploy the MSI installer to work for .NET 4.0 full applications over client?

Can Visual Studio 2010 setup and deploy the MSI installer to work for .NET 4.0 full applications over client?


Try changing the "Launch Conditions" of the MSI in the project settings:

Can Visual Studio 2010 setup and deploy the MSI installer to work for .NET 4.0 full applications over client?

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 the setup.exe if required; you would then continue with your install when the framework is installed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜