kkkwj
Posts: 88
Joined: Thu Mar 01, 2007 10:45 pm

Minimum .NET 2.0 not working as expected

Hi, using AIP 472 I checked the minimum version of .net framework 2.0 on the predefined launch conditions section of the prerequisites page, then installed the msi on a machine without .net 2.0. The installation completed fine, with no protest or warning that the target machine was missing .net 2.0.

Am I doing something wrong? I would have expected the installer to protest.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

For .Net install detection Advanced Installer verifies the version of the "mscoree.dll" file (the file is shared between .Net versions). And this file is not removed when a version of .Net is uninstalled, for example if you have both 1.0 and 2.0 version and you uninstall the 2.0 version then the version of the "mscoree.dll" remains 2.0. In a future version of AI we will improve this with a custom detection.

Here are what condition you can use to detect the version of .Net Framework:
http://msdn2.microsoft.com/en-us/library/aa480198.aspx

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
gsmmc
Posts: 7
Joined: Wed Feb 28, 2007 11:42 pm

As an alternative in the meantime, you can add the .NET 2.0 executable to the prerequisites and check for the following conditions:

Criteria: File Version
File to Search: [WindowsFolder]Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
Minimum: 2.0.50727.42

MS Recommends using mscorlib.dll for version checking. Also this DLL is removed when you uninstall the .NET 2.0 Framework.

[Note: After reading the article submitted by gigi, I'm not sure if mscorlib.dll is removed when you uninstall .NET 2.0 IFF you have .NET 3.0 installed because it is a shared DLL. You may want to test this before assuming the method above works in all situations]

Hope this helps,
GS
kkkwj
Posts: 88
Joined: Thu Mar 01, 2007 10:45 pm

Awesome help response, many many thanks.

Return to “Common Problems”