Visual Studio 2012 project won't open in 2010

42,699

Solution 1

It takes three step:

Step 1

Open solution file (.sln) in a text editor and change

 Microsoft Visual Studio Solution File, Format Version 12.00

to

 Microsoft Visual Studio Solution File, Format Version 11.00

Step 2

Open application configuration file (App.config) in a text editor and change

sku=".NETFramework,Version=v4.5"

to

sku=".NETFramework,Version=v4.0"

Step 3

Open project file (for C# language .csproj) in a text editor and change

<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>

to

<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>

Now enjoy your project in VS 2010 !

Solution 2

You may only need to open the project in Visual Studio 2012, and go to the project's properties page.

On the Application tab, locate the Target Framework setting, and change it to .Net Framework 4.

After that, you should be able to open it in Visual Studio 2010.

Also see Converting VS2012 Solution to VS2010, but so far I haven't had to do any conversions on VS2012-created projects to open them ins VS2010 - but YMMV.

[EDIT]

I just tested this again (to be sure) by creating a .Net 4.5 project in VS2012, and verified that I couldn't open it in VS2010. Then I opened it in VS2012 again and changed the framework version to .Net 4.0. After that I could open it in VS2010.

Note that I didn't have to make any other changes. However, this is on a computer with VS2010 and VS2012 installed, so it's possible that installing VS2012 might do something with VS2010 to make it work...

Solution 3

I have done this at work

Open .sln file with notepad

Change the two lines below

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012

To

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010

and hey presto the solution now opens in VS2010

Share:
42,699

Related videos on Youtube

user2141272
Author by

user2141272

Updated on July 09, 2022

Comments

  • user2141272
    user2141272 almost 2 years

    I've created a game for an assignment in Visual Studio 2012 and the university I'm at uses 2010 and it won't open! It mentions something about NET Framework 4.5. How can I convert my project so it will open in 2010?

    • Meirion Hughes
      Meirion Hughes about 11 years
      Not one for pointing out the obvious, but could you not just make a new 2010 project and import all your code files?
    • Mark Rotteveel
      Mark Rotteveel about 11 years
    • Alex Filipovici
      Alex Filipovici about 11 years
      possible duplicate of Converting VS2012 Solution to VS2010
    • Matthew Watson
      Matthew Watson about 11 years
      @Mark: Not a duplicate, since you don't need to follow the same steps to go from 2012->2010 as you do for 2012->2008
    • Alex Filipovici
      Alex Filipovici about 11 years
      Here's the quick workaround (because you need it ASAP :)): http://stackoverflow.com/a/13458225/674700.
    • Samyeak Maharjan
      Samyeak Maharjan about 11 years
      The point here is: Visual Studio 2010 can not open .NET 4.5 projects (at least you can't work on those projects). If you only have supported projects in your solution file and VS2010 has SP1 applied, you should be able to switch between both
    • Mark Rotteveel
      Mark Rotteveel about 11 years
      @MatthewWatson They are not exact duplicates I admit, but I would think that a combination of both answers to that question would fix the issue as well
  • user2141272
    user2141272 about 11 years
    Do I change it to .NET Framework 4 or Framework 4 Client Profile?
  • Matthew Watson
    Matthew Watson about 11 years
    If you are using full .Net 4.5 at the moment, change it to Framework 4. If you're currently using .Net 4.5 Client Profile, you can probably change it to .Net 4 Client Profile. If it still doesn't work, see the thread that Alex mentioned earlier: stackoverflow.com/a/13458225/674700
  • Xonatron
    Xonatron over 8 years
    I figured it out. Visual Studio Express 2010 is version 10 and installing XNA 4.0 upgrades it to version 11. It loads my version 11 projects! :)