6
votes

I am building an installer for my application, which is entirely built with .NET 3.5 Client Profile. In my installer, I choose ".NET 3.5 Framework SP1 Client Profile" for prerequisites.

However, when I try to install it on a fresh copy of Windows 7 Professional, it wants to install both 3.5 and 4.0. Are there other places where I can / have to set the targeted / required platform?

1
1) Are you sure you deselected .NET 4.0 as a prerequisite? It may be selected by default. 2) Are you sure you don't have any dependencies/prerequisites that require .NET 4.0?Kendall Frey
1) Yes. 2) Not that I can find. All projects in the solution that are referenced in the installer are set to 3.5 in the Target framework. The used dlls are say they are compiled against 2.0 even ("Runtime Version"). The only other thing that is selected in Prerequisites is "Windows Installer 3.1".Bart Friederichs
Perversely, prerequisites are set on a per-configuration basis, I believe - so if you've changed it on Debug, but you're building a Release build, I think you'll get the original prerequisites - might be worth checking.Damien_The_Unbeliever
I've set the prereq in all configurations. No luck. Looking through all projects now ...Bart Friederichs

1 Answers

5
votes

Found it.

It was the installer itself that needed the framework:

LeftMouseButton on the installer project --> View --> Launch Conditions

there is a value Version that needs to be set as well.