Search code examples
.netinstallationpackaging

.Net Prerequisite 2.0 (x64) missing from installation package configuration


I am building a package project in Visual Studio 2008. Some of my users that will be installing this package do not have the x86 version of .net 2.0 installed on their 64bit machines. How do I set the prerequisite of .net 2.0 to either version; x86 or x64? Keep in mind I do not wish to package .net with the application; I want the installer to be able to download it from the venders website.

Thanks


Solution

  • The 32-bit version of .NET Framework 2.0 cannot be installed on 64-bit machines, so you need separate prerequisites: one for 32-bit and another for 64-bit. Unfortunately Visual Studio setup project cannot condition custom prerequisites based on the Windows version.

    A solution is to manually create a .NET Framework 2.0 x64 prerequisite in "c:\Program Files \Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages" folder and configure it to run only on 64-bit machines. Perhaps this will help you: http://msdn.microsoft.com/en-us/library/ms229223(VS.80).aspx

    Another solution is to use a commercial setup authoring tool which allows you to condition prerequisites based on the target Windows version.

    Regarding the blog post mentioned by user358051, I disagree. Windows Installer is very powerful in the right hands and it's integrated with Windows. It may have limitations and efficiency problems, but it gets the job done.