Tuesday, December 4, 2012

The setup requires the .NET Framework version 4.0.

I created a a setup Project for an application I created in .Net framework. But when installing it on a different machine it gave me following Error:

The setup requires the .NET Framework version 4.0. Please install the .NET Framework and run the setup again. The .NET Framework can be obtained  from the web. Would you like to do this now?








http://www.aneef.net/wp-content/uploads/2010/05/5-24-2010-4-00-44-PM.png



I found out that it looks for a specific version of .Net framework if you kept the the default value for Version (in this case 4.0). To resolve this we need to set the version to 'Any' so it run just fine independent of any specific version.

Here is how we configure it.

Under the Setup Project click on the Detected Dependencies.
Click on the Microsoft .Net Framework. Go to Properties window
Change the Version property to 'Any' (Or as per your preference)
Build teh Setup Project again and retry.

No comments:

Post a Comment