Edit

General property page (file)

This article applies to Windows projects. For non-Windows projects, see Linux C++ Property Page Reference.

When you right-click a file node in Solution Explorer and then select Properties, the General property page under the Configuration Properties node opens. It contains the following properties:

  • Excluded From Build

    Specifies whether the file should be in the build for the current configuration.

    To programmatically access this property, see ExcludedFromBuild.

  • Content (Applies to UWP apps only.) Specifies whether the file contains content to be included in the app package.

  • Item Type

    Specifies the tool that processes the file during the build process. Files whose extension is known to Visual Studio have a default value for this property. You can specify a custom tool if you have a custom file type or want to override the default tool for a known file type. For more information, see Specifying custom build tools. You can also use this property page to specify that a file isn't part of the build process.

    The following screenshot shows the property page for a .cpp file. The default Item Type for this kind of file is the C/C++ Compiler (cl.exe), and the property page exposes various compiler settings that can be applied to this file only.

    Screenshot of the Property Pages dialog showing the General property page for a file.

    The following table lists the default Item Types:

    File extension Item Type Default Tool
    .appx XAML Application Definition App packager
    .hlsl, .cso HLSL Compiler fxc.exe
    .h C/C++ Header C/C++ Preprocessor
    n/a Does not participate in build n/a
    .xml, .xslt, .xsl Xml XML Editor
    .resw, .resjson PRI Resource (UWP apps) MakePri.exe
    Media (UWP) App packager
    .xsd XML Data Generator Tool XML Schema Definition Tool (Xsd.exe) (Requires .NET workload. Not included with MSVC.)
    Manifest Tool mt.exe
    .rc Resource Windows Resource Compiler (rc.exe)
    .appxmanifest App Package Manifest App packager
    .obj Object C/C++ Linker (link.exe)
    .ttf Font n/a
    .txt Text n/a
    n/a Custom Build Tool User-defined
    n/a Copy file n/a
    .packagelayout App Package Layout App packager
    .resx Compiled Managed Resource Resgen.exe (Resource File Generator)
    .natvis C++ debugger visualization file Natvis framework
    .jpg, .bmp, .ico, etc. Image Resource compiler based on application type.
    .cpp C/C++ compiler cl.exe

    To programmatically access this property, see Tool.

For information on how to access the General property page under the Configuration Properties node, see Set C++ compiler and build properties in Visual Studio.

See also

C++ project property page reference