views:

43

answers:

2

How can I detect if .Net 2.0 SP1 is installed from my installer msi, and abort the install if it is not present?

I know how to do this in code, but it seems cleaner do it in the vdproj. It feels more declarative.

+2  A: 

All you need is a Launch Condition Editor where you can set minimum .net version installed on the client machine to 2.2.30729 (.net 2.0 sp1). Hopes it helps.

Nagg
I only see major framework release version numbers in the .Net Framework launch condition. No service packs. Definitely not 2.2.30729.
Josh Buedel
You can set this value to property manually (as a string)
Nagg
A: 

You could check the value of the MsiNetAssemblySupport property, comparing it to the version number for Fusion.dll when .Net 2.0 SP1 is installed.

Details from MSDN - http://msdn.microsoft.com/en-us/library/aa370325%28VS.85%29.aspx

Ed