Take you to the configuration of Visual Studio--property Manager

Source: Internet
Author: User

Throw a question from the beginning

On my computer was originally installed VS2010 Professional Edition, now because of the needs of the project and installed VS2015, but the original VS2010 can not be used, in the VS2010 compiled the program times the following error:

1>tracker:error trk0002:failed to execute command: "" C:\Program Files (x86) \microsoft Visual Studio 14.0\vc\bin\amd6 4_x86\cl.exe "@c:\users\administrator\appdata\local\temp\tmp6095048feb5e4db6845129a7e84fde38.rsp". The action identifier is incorrect.

Solution Solutions

From this error we can find that the compiler with VS2010 is compiled with the VS2015 compiler (Visual Studio 14.0), and is 64-bit, indicating that the compiler does not match, then how to set back to VS2010 compiler?
The following answers were found through Google:
Menu View->property manager->debug| Win32->microsoft.cpp.win32.user, double-click on it to open the Settings page, view VC + + directories->executable directories value, we will find that sure enough to set up the VS2015 compiler , change it, set it to the VC\bin directory under the VS2010 installation directory, as mine is: C:\Program Files (x86) \microsoft Visual Studio 10.0\vc\bin.


Property Manager

Compile the program again, you will find that the error is not, perfect!

But the property manager has never really used this setup before, what is its function? What is the difference between it and the property page of the right-click Project->properties? So it took a deep step to explore!

In-depth study of conceptual understanding

First, understand the two concepts: Project property and Property Sheet.
Project property: Also known as item properties, is the property of your current project, stored in your project's configuration file,ProjectName. vcxproj.

Property Sheet: Also known as the attribute table, can be used for multiple project property formulation, you can create your own add property configuration, you can also use the system default property sheet, saved in the. props file extension. The attribute table (property Sheet) is added and managed in the Properties manager.

Use of Property Manager
  1. Open the Property Manager window. Menu View->property Manager or View->other Windows->property Manager. You can see the following interface:

    Property Manager
  2. The settings for the property. Double-click the property sheet name (such as Microsoft.Cpp.Win32.user) to set it up. You will find that its formulation is the same as the project properties that are opened by the right-click Project->properties. Microsoft.Cpp.Win32.user is the default property sheet for the current system user and is saved in the C:\Users\Administrator\AppData\Local\Microsoft\MSBuild\v4.0\ Microsoft.Cpp.Win32.user.props, using this username to log in to the operating system, the items created with VS will inherit the property sheet's configuration properties.
  3. Set VC + + directories. In this formulation, we can set the VC + + compile, link the various tools and resources required path.

    VC + + Directories
    Executable Directories: The path of the executable program (such as Cl.exe, Link.exe, lib.exe, etc.), usually contains the path of VC\bin;
    Include Directories: The path to the header file to include, such as the CRT header file, typically contains the path of the vc\include;
    Reference Directories: The path of the referenced library, such as the Library of MFC (VC\ATLMFC\LIB);
    Libbrary Directories: The path of the Lib library to be included, usually contains the path of the vc\lib;
    SOURCE directories: The path of the origin code, usually contains the path of the VC\CRT\SRC;
    Exclude Directories: The path of the file that is not included.
  4. Custom macros. Do you often see macros when you are compounding project properties, such as (S oLuTIoNDIR), (Configuration), $ (OutDir), etc., but you don't know how to change it, these are some of the macros that MSBuild has predefined for you. In fact, you can also define some of your own macros, you can even rewrite the original macros. Here's how:

    User Macros
    You can see your own defined macros when you are formulating your own engineering properties, such as additional Include directories:

    Use User Macros
  5. Add or Import property Sheet, this is too simple, look directly at the picture:

    Import and Export property sheet
Inheritance relationships for attributes

The properties of the project are hierarchical. Each layer inherits the value of the previous layer, but the inherited value can be overridden explicitly by setting the property. Here is the basic inheritance relationship (inheritance tree):
1. Default settings from the MSBuild CPP toolset (... \program Files\msbuild\microsoft.cpp\v4.0\microsoft.cpp.default.props, it will be imported by ProjectName. vcxproj file).
2. Property sheets (attribute table), which is the attribute table set in Properties Manager.
3. Engineering Documents ProjectName. vcxproj. (You can override the default values and settings in property sheet.)
4. Meta data for each item.

Reference article: https://msdn.microsoft.com/en-us/library/669zx6zc.aspx

Copyright NOTICE: This article for Bo Master original article, without Bo Master permitted not for any commercial use, reproduced please indicate the source.

Take you to the configuration of Visual Studio--property Manager

Related Article

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.