Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2010
Visual Studio
Visual C++
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2010/.NET Framework 4

Other versions are also available for the following:
Visual Studio 2010 - Visual C++
Property Sheets (C++)

A project property sheet is an XML-based file with the extension .props. It enables you to specify switches for build tools such as the compiler or linker and create user-defined macros.

You can use property sheets to create project configurations that can be applied to multiple projects since project settings that are defined in .props files are inheritable, unlike project settings defined in Project Files (.vcxproj files). Therefore, a project configuration defined in a .vcxproj file can inherit project settings from one or more property sheets (.props files). For more information, see Property Inheritance.

For information on tasks that demonstrate this concept, see:

The following .props file contains both build tool properties and user-defined macros.

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ImportGroup Label="PropertySheets" />
  <PropertyGroup Label="UserMacros">
    <VCROOT>$(DDROOT)\vc</VCROOT>
    <VCPROJDEFAULTS>$(BINDIR)\VC8\VCProjectDefaults</VCPROJDEFAULTS>
    <INCLUDEPATH>$(VCROOT)\Inc</INCLUDEPATH>  
</PropertyGroup>
 <ItemDefinitionGroup>
    <ClCompile>
      <PrecompiledHeader>Use</PrecompiledHeader>
      <ForcedIncludeFiles>warning.h</ForcedIncludeFiles>
    </ClCompile>
    <Link>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
    </Link>
  </ItemDefinitionGroup>
  <ItemGroup>
    <BuildMacro Include="VCROOT">
      <Value>$(VCROOT)</Value>
    </BuildMacro>
    <BuildMacro Include="VCPROJDEFAULTS">
      <Value>$(VCPROJDEFAULTS)</Value>
    </BuildMacro>
    <BuildMacro Include="INCLUDEPATH">
      <Value>$(INCLUDEPATH)</Value>
    </BuildMacro>
</ItemGroup>
</Project>
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker