<p>1, Create and build a default Windows Forms project and look at the project properties. It says that the project is targetting .NET Framework 2.0. </p>

<p>2, Create a Setup project that installs just the single executable from the Windows Forms project. </p>

<p>3, Run that installer and it always says that it needs to install .NET 3.5 SP1 on the machine. But it obviously only really needs 2.0 and so I do not want customers to be forced to install .NET 3.5 when they do not need it. They might already have 2.0 installed and so forcing the upgrade is not desirable!</p>

<p>I have looked at the prerequisites of the setup project and checked the .NET Framework 2.0 entry and all the rest are unchecked. So I cannot find any reason for this strange runtime requirement. Anybody know how to resolve this one?</p>

[{'answer_id': 68585, 'author': 'David J. Sokol', 'author_id': 1390, 'author_profile': 'https://Stackoverflow.com/users/1390', 'pm_score': 1, 'selected': False, 'text': "<p>Even if you are targetting a 2.0 deployment, some of your assemblies might require 3.5.  For instance, LINQ requires 3.0.  This should, however, be reflected when you build.  Check each assembly to ensure that it's 2.0 compatible.  You don't want any 3.5 things sneaking in.  If this is the case, my guess would be a 3rd party control library with support for WPF.</p>\n"}, {'answer_id': 71018, 'author': 'Phil Wright', 'author_id': 6276, 'author_profile': 'https://Stackoverflow.com/users/6276', 'pm_score': 1, 'selected': False, 'text': '<p>I eventually found the answer to my own question. </p>\n\n<p>Comparing the projects files using Notepad I noticed that a setup project in VS2008 has an entry that requests version 3.5 and the same section in the VS2005 project was marked as 2.0. What is strange is that the section looks like something you cannot manually alter within the Visual Studio environment and so you are forced to update the project file manually. Anywhere here is the offending area of the project file for those that comes across the same issue...</p>\n\n<pre><code>"Deployable"\n{\n    "CustomAction"\n    {\n    }\n    "DefaultFeature"\n    {\n    "Name" = "8:DefaultFeature"\n    "Title" = "8:"\n    "Description" = "8:"\n    }\n    "ExternalPersistence"\n    {\n        "LaunchCondition"\n        {\n            "{A06ECF26-33A3-4562-8140-9B0E340D4F24}:_FC497D835F7243569DCCC3E3ACE4196D"\n            {\n            "Name" = "8:.NET Framework"\n            "Message" = "8:[VSDNETMSG]"\n            "Version" = "8:3.5.30729"  &lt;--- UPDATE THIS TO 8:2.0.50727\n            "AllowLaterVersions" = "11:FALSE"\n            "InstallUrl" = "8:http://go.microsoft.com/fwlink/?LinkId=76617"\n            }\n        }\n    }\n</code></pre>\n'}, {'answer_id': 71193, 'author': 'Adrian Clark', 'author_id': 148, 'author_profile': 'https://Stackoverflow.com/users/148', 'pm_score': 6, 'selected': True, 'text': '<p>No need to edit the file manually.  The hint is just above the GUID there:"LaunchCondition".</p>\n\n<ol>\n<li>Right click the setup project</li>\n<li>Select "View" -> "Launch Conditions"</li>\n<li>Expand the "Launch Conditions" node if it isn\'t already expanded</li>\n<li>Right click the ".NET Framework" node and select "Properties Window"</li>\n<li>In the "Properties" window change the "Version" value to the appropriate value, in your case 2.0.50727.</li>\n</ol>\n\n<p>I\'m not sure why this isn\'t set appropriately from the start.</p>\n'}, {'answer_id': 395790, 'author': 'Cyril Gupta', 'author_id': 33052, 'author_profile': 'https://Stackoverflow.com/users/33052', 'pm_score': 0, 'selected': False, 'text': "<p>I've always used Innosetup to deploy my projects. It's very fast, and very customizable. There's almost nothing you can't do with a bit of scripting. Innosetup can detect which version of the Framework is installed, and prompt the user if the correct version is not present (with scripting).</p>\n\n<p>I recommend that you try alternative deployment tools like Innosetup and see if you like them. There's a wealth of an opportunity out there.</p>\n"}]
['https://Stackoverflow.com/questions/68561', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/6276/']