Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The C# project is targeting ".Net Framework, Version =v4.5",which is not installed on this machine [closed]

Tags:

c#

.net

I am working on a C# project using VS 2012 installed on windows 8 this afternoon. It works well and I upload my code to TFS before I left for home.

But when I download and open this project using VS 2012 installed on windows 7. I got the error message below.

The C# project is targeting ".Net Framework, Version =v4.5",which is not installed on this machine. To proceed, select an option below.

  1. Change the target to .Net Framework 4.5. You can change back to ".Net Framework, Version=v4.5" at later time.
  2. Download the targeting pack for ".Net Framework, Version=v4.5". The project will not change.
  3. Do not load the project.

I am sure I have installed .Net Framework 4.5 on my windows 7 laptop. Now, I cannot load my project. Any one knows how to solve this problem?

Many thanks!

--------------- updates--------

For people who have the same problem:

I uninstalled VS 2012 and .Net Framework 4.5 and re install both of them. The problem is solved. Now I can load my project.

like image 530
Ivy Avatar asked Jul 12 '13 01:07

Ivy


1 Answers

Right-click your project and click in "Properties". In the tab "Application" see if you have the option for the 4.5 framework in the "Target Framework" dropdown list. If you have it, just select it and try to build your project again. If you don't have this option, go to "Programs and Features" in Windows 7 and make sure you have .NET Framework 4.5 installed. If you have it, then try repairing your installation of VS 2012 in this same menu and verify again your options in the "Target Framework" dropdown list.

like image 88
jcsilva87 Avatar answered Oct 12 '22 07:10

jcsilva87