How to use the VS2013 solution in VS 2010

Source: Internet
Author: User

Today to open VS2013 with VS2010, always feel that VS2010 to VS2012 is only a flat change in the interface, the platform toolset has changed, but to a large extent possible upward compatibility. I searched some articles on the internet, one of which said:

Starting with VS2010, VS uses a unified. sln as the solution file so far, each version of the upgrade is just the upgrade and optimization of the platform toolset, and the solution is fully compatible. You can use VS2013 to open VS2010-generated solutions, or you can use VS2010 to open a later version of VS2013 build Solution

My understanding is that, starting with VS2010, no proprietary file format is created, just a text file in XML format that determines the platform toolset and VS version of the solution. Since. SLN is just a text file, re-set the VS version and Platform toolset specified in it, you might be able to open a high-resolution version with a lower version.

Then try to use VS2010 to open vs2013, here is my attempt to record, try to find in addition to modify. SLN can be opened with vs2010 vs2013, but also modify the project's platform toolset to ensure the best compatibility.

(1) Open directly

Open the VS2013 generated file with VS2010, resulting in the prompt as above.

Select a vs2013 solution file. sln to open it as a text document. (I'm using sublime text 2, which I think is a great tool to replace Notepad, sexy and small.) Someone from notapad+ to use it, its own value it. )

At the beginning of the file we can see some key information:

Format Version 12.00

Visualstudioversion = 12.0.21005.1

Minimumvisualstudioversion = 10.0.40219.1

Indicates that the format version generated by the. SLN is 12.00 (vs2013), vs version is 12.0.21005.1 (vs2013), and the minimum compatible version is 10.0.40219.1 (VS2010).

That might change the solution to 10.0. More than 40219.1, all right?

"Version Difference"

A novice like me. Note here, version 12.00 means that versions are vs2013 instead of vs2012, and this is the end of this article that summarizes the behavior in the VS version. The next step is to change format Version to 11.00 instead of 10.00.

(2) Modify the. sln file.

(3) Re-open

Open the modified solution file with VS2010 and open it successfully .

(4) Compiling

I think of vs2012 and VS2010 's platform toolset inconsistent , vs2012 is v110,vs2010 v100,vs2013 is v120. I don't want to go through the project file, maybe vs has reset the platform toolset when loading the solution? So try ① Direct compilation.

The compilation failed because the result platform toolset was not reset, there was no vs2013 on this machine, and the platform toolset for v120 was not found . Also, note that there are "project files containing toolsversion=" 12.0 "Settings ... Treats the item as having a toolsversion= "4.0" setting. It seems to be. NET tool version number, without modification will be automatically compatible.

manually modified platform toolset version , compiled to see if it can run.

Switch

③ compiled and run successfully. At the same time, the ToolsVersion version number is considered to be 4.0.

④ to find the corresponding ToolsVersion project file, modify it.

Switch

Recompile, no error.

⑤ integrated above, the project has been implemented from VS2013 to VS2010 migration.

"Summary" low version vs open high version generally want to modify the place. 1. The VS version number specified in the. sln file and Platform Toolset 2, modify the platform toolset in the project file (v4.0→v12.0) 3, others.

The above "other", mainly refers to the environment variable in the configuration related to the change of the path caused by the change in the version, such as vs2010 in the VS installation directory in Microsoft sdks\v7.x, after vs2012 moved to the VS installation directory of Windows Kits vs installation directory. Note the difference.

How to use the VS2013 solution in VS 2010

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.