-2

I have installed .NET framework 4.0 on my system , but when I open my project on VS 2010 , still getting the message ,

This Project is incompatiable with the current version of Visual Studio

Any Idea? I don not want to change the target framework to v4.0 in .csproject.

Simsons
  • 12,295
  • 42
  • 153
  • 269
  • 2
    VS 2010 is 4.0, not 4.5. I don't think you can use 4.5 with 2010 - you'll need 2012. – Tim Sep 06 '13 at 06:58
  • The solution is to modify the csproj file and change the TargetFrameworkVersion from "v4.5" to "v4.0" but since you dont want to do that you have to switch to vs 2012 – Rohit Sep 06 '13 at 07:02
  • possible duplicate question http://stackoverflow.com/questions/12390175/targeting-net-framework-4-5-via-visual-studio-2010 – Saghir A. Khatri Sep 06 '13 at 07:06
  • @Simsons - It's not random. Why do you think it's random? VS 2003 couldn't do .NET 2.0, VS 2005 couldn't do 3.0 or 3.5, VS 2008 couldn't do 4.0. You can go back (to some degree) from a certain point in the tech timeline, but you can't go forward unless you have the newer version. And no, I wasn't one of the downvoters. – Tim Sep 06 '13 at 07:09

2 Answers2

3

As I know you can't target .NET 4.5 with VS2010 the same way you couldn't target .NET 4.0 with VS2008. You will need to install VS2012 if you want to target .NET 4.5.

EDIT

found this answer but haven't tried it by myself

Community
  • 1
  • 1
Guru Stron
  • 102,774
  • 10
  • 95
  • 132
3

The error you are getting is not about an incompatible .NET framework version, it is about an incompatible Visual Studio version!

Visual Studio project versions are not linked to .NET versions. A Visual Studio 2008 project can target .NET 2.0 up to 3.5, but still you can't open a VS 2008 project with Visual Studio 2005, even though Visual Studio 2005 can create .NET 2.0 projects, too.

Having the latest .NET framework on your machine does not guarantee that you can open projects with the latest Visual Studio version in an older Visual Studio.

You can simply not downgrade Visual Studio projects easily. There are posts describing how to to it by modifying the project files, etc., but in general you can only upgrade projects using the wizard that's automatically opened by Visual Studio.

Thorsten Dittmar
  • 55,956
  • 8
  • 91
  • 139