https://msdn.microsoft.com/en-US/library/5k4a0033(v=vs.80).aspx

How to: Add New Property Sheets to C++ Projects 

To create a project property sheet

  1. Open your solution in the Visual Studio IDE.

  2. From the View menu, select the Property Manger menu item. The Property Manager window appears docked on the left of the IDE.

  3. In Property Manager, right-click the project that will contain the new property sheet, and then select the Add New Project Property Sheet menu item.

  4. In the Add New Item dialog box, enter the name of the new property sheet in the Name text box.

  5. Click Add.

 

How to: Edit Project Property Sheets 

The easiest way to edit project Property Sheets (C++) is by modifying project settings in property pages for property sheets.

To edit a project property sheet

  1. Open your solution in the Visual Studio IDE.

  2. From the View menu, select the Property Manger menu item. The Property Manager window will appear, docked on the left of the IDE.

  3. In Property Manager, double-click a property sheet. The property pages for the property sheet will appear.

  4. Enter or set new property values in the fields that you want to modify.

    NoteNote

    Aggregate properties are separated with a semicolon. For more information, see Property Inheritance.

  5. Click the Apply button.

    NoteNote

    When you click Apply, the new settings will automatically propagate to all project files and property sheets that inherit from the property sheet that you modified.

  6. Click the OK button.

 

 

How to: Inherit Project Settings from Property Sheets 

This topic describes how to apply project settings that are defined in property sheets, to your C++ projects. You can either use the Property Manager or set the Inherited Project Property Sheets property to specify that your Visual C++ project or project property sheet will inherit its project settings from another property sheet.

To apply project settings that are defined in property sheets using the Property Manager

  1. Open your project in the Visual Studio IDE.

  2. Select Property Manager from the View menu.

  3. In Property Manager, right-click the project, configuration, or user-defined property sheet that you want to apply project settings.

    NoteNote

    Default project property sheets cannot inherit project settings from user-defined property sheets.

  4. Select Add Existing Property Sheet from the context menu.

    When you select Add Existing Property Sheet, the Add Existing Property Sheet dialog box appears. This dialog box helps you locate and specify which property sheet you want to apply to your project, configuration, or user-defined property sheet.

To apply project settings that are defined in property sheets using the Inherited Project Property Sheets property

  1. Open your project in the Visual Studio IDE.

  2. In Solution Explorer, right-click the node for the project or the property sheet that will inherit the project configuration.

  3. On the shortcut menu, click Properties. The property pages for your project will appear.

  4. Use the Configuration control to specify which project configuration to apply the project settings.

  5. In the Inherited Project Property Sheets field of the General property page, enter the path to the property sheet that contains the settings you want to inherit.

  6. Click Apply.

    NoteNote

    When you click Apply, the new settings will automatically propagate to all project files and property sheets that inherit from the property sheet that you modified.

 

How to: Add Property Sheets to Source Code Control 

When you set up a Visual C++ project to work together with Visual Source Safe, the project system will automatically update the .vcproj file in source code control. However, if you add user defined property sheets to your C++ project, the project system will not automatically update these files in source code control.

To set up property sheets in Visual Source Safe

  • Create a directory under the solution directory to store all your project property sheets for that solution.

    - or -

  • For broadly-used property sheets, such as property sheets that are common to several teams in a company, create a directory that is a peer directory of the solution directories to store all your project property sheets used by your teams within the company.

 

User-defined Macros 

Visual C++ enables you to create custom macros for building projects in the integrated development environment. Macros that you create are called user-defined macros. You can use the Add User Macro Dialog Box to easily create new custom macros.

User-defined macros are defined in .vsprops files. For more information, see XML Schema Definition for Property Sheets.

 

posted on 2015-11-04 17:02  风云逸  阅读(50)  评论(0)    收藏  举报