Overview
I have an Application running under .NET Framework 3.5. As the clients use Windows 7 (default: .NET 3.5) and Windows 8 / 8.1 (default: .NET 4.5). At the moment the .NET Framework (3.5) gets installed if not available on the system.
The application itself is able to run under .NET 4.5, thus I'd like to remove the dependency to .NET Framework 3.5.
Problem
In the Setup Project, I have to define the 'Launch Conditions' where .NET Framework is listed and can't be removed. When configured with Version 3.5 it will run on Windows 7 and gives an error on Win 8. When changed to Version 4.5 it will run on Win 8 but not 7. When I change the version to 'Any' it installs on Win 7 but throws an error during installation on Win 8, saying: "Error 1001 InstallUtilLib.dll. unknown error".
Question
How can a setup project check for a version higher than .NET Framework 3.5 instead of 'Any' and if I have to use 'Any' how to get it working under Win 8?
Details
I'm using VS2013 with the 'Visual Studio Installer Projects' Extension v1.0.0
Solution structure:
- Custom_Action (NET 3.5, x86)
- MyProject (NET 3.5, x86)
- SetupProject (Property 'TargetPlatform' set to x86)
The app.config of the Custom_Action and MyProject is set like this:
<configuration>
<startup>
<supportedRuntime version ="v2.0.50727"/>
<supportedRuntime version ="v4.0"/>
</startup>
</configuration>
When I start the setup on Win 7 everything works. When I start the setup on Win 8 I get through the Configuration Dialogs of the Setup. It will halt with the Error "Error 1001 InstallUtilLib.dll. unknown error"
<supportedRuntime>
element. – Hans Passant