VS 2010 installation project requires .NET 4.0, but it is already installed

I have a VS 10 project using .Net 4.0 and I use a lot of things that require 4.0. I created the VS Setup project, adding the main output from my project and built it. Then I installed it, and everything worked fine. In a few days, I am ready to make a new assembly to rebuild my project, and then the installation project. Now when I start msi, it tells me that the .NET Framework 4.0 is required .... I decided that I screwed up, so I just create a new installation project, and it works fine. But again after a few days (restarted VS there, perhaps, and perhaps even on the computer) I rebuild and get an error message indicating that .Net 4.0 is required. I did this several times to check, and this happens sequentially, and I can’t understand why.

The project that I create and install has a Windows service that installs as a startup project. I will switch this to the console object of the application for local testing, and also build and test the project (and not the installation project). This is the only thing I can think about that it can affect the assembly, but again, I can not understand why.

Any help is appreciated.

+4
source share
1 answer

This error message is triggered when the launch conditions in the installation project are not met.

  • Go to View> Editor> Launch Conditions
  • Change the .Net Framework version value to match the version of your installation project compiled into. By default, in the project setup for installation and deployment in 2010, the .NET 4.0 client profile is set.
+1
source

All Articles