Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Visual C++
Property Sheets
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Visual C++ Concepts: Creating and Managing Projects 
Property Sheets (C++) 

A project property sheet is an .xml file with the extension .vsprops. 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 .vsprops files are inheritable, unlike project settings defined in Project Files (.vcproj files). Therefore, a project configuration defined in a .vcproj file can inherit project settings from one or more property sheets (.vsprops files). For more information, see Property Inheritance.

For information on tasks that demonstrate this concept, see:

Example

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

<?xml version="1.0" ?>
<VisualStudioPropertySheet ProjectType="Visual C++" Version="8.00"
   Name="Visual C++ Project Properties" OutputDirectory="$(VCPACKAGES)"
   UseMFC="FALSE" UseATL="FALSE">

      <Tool Name="VCCLCompilerTool" UsePrecompiledHeader="3"
         ForcedIncludeFiles="warning.h" /> 
      <Tool Name="VCMIDLTool" />
      <Tool Name="VCResourceCompilerTool" /> 
      <Tool Name="VCLinkerTool" OptimizeForWindows98="1" />

      <UserMacro Name="VCROOT" Value="$(DDROOT)\vc" /> 
      <UserMacro Name="VCPROJDEFAULTS"
         Value="$(BINDIR)\VC8\VCProjectDefaults" /> 
      <UserMacro Name="VCPACKAGES" Value="$(BINDIR)\VC8\VCPackages" />
      <UserMacro Name="INCLUDEPATH" Value="$(VCROOT)\Inc"
         InheritsFromParent="TRUE" Delimiter=";" />

</VisualStudioPropertySheet>

Use the XSD Schema for Property Sheets to validate your own .vsprops files.

See Also

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
How to create one      BartoszMilewski   |   Edit   |   Show History
There is no explanation how to create a project property sheet based on an existing project
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker