简体   繁体   中英

VS 2012 solution and projects - incompatible with VS 2010?

I was under the assumption the solutions and / or C# projects created in VS 2012 could also be opened in VS 2010 (with SP1 applied).

But I wasn't able to do so - VS 2010 didn't want to load the solution file, and after I manually "tweaked" it, now it complains about the *.csproj project file being incompatible with this current version of VS 2010 .....

What am I missing?

You can fix it by,

1- Change 12.00 to 11.00

2- open *.csproj file by text editor and change this line

<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>

to

<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>

Project will open after restart of VS 2010

If you create a solution with visual studio 2012 on the top of your solution-file there are the following two lines:

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

You can Replace the Version 12 to 11. And than the solution should work in Visual Studio 2010. I'm not sure if the visual studio 2010 can handle project-files which have target .net-framework 4.5

Removing:

<AppContainerApplication>true</AppContainerApplication>    

Under the tag:

<PropertyGroup Label="Globals">    

Solved it for me. Though it is funny, on another PC (Win10 instead of 7) it worked including this line.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM