Search code examples
visual-studioprojects-and-solutions

What does the Keyword tag mean in a *.vcxproj file?


I see the following in many *.vcxproj files

<PropertyGroup Label="Globals">
  <ProjectGuid>{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}</ProjectGuid>
  <Keyword>Win32Proj</Keyword>
  <RootNamespace>yadayada</RootNamespace>
</PropertyGroup>

What does the <Keyword>Win32Proj</Keyword> segment mean? Does it affect any behavior during the build?

In general, where can I find documentation on the tags in a project file?


Solution

  • <Keyword>Win32Proj</Keyword> tells Visual Studio which of the Windows-specific dependencies you are going to use.

    It depends on type of the project selected during its creation. enter image description here

    For already present project you may view this setting in the Project Properties --> General. enter image description here

    Now, up to your question.

    Does it affect any behavior during the build?

    Win32Proj means that AdditionalIncludeDirectories will contain paths to WinAPI libraries. If it were MFCProj, then paths to MFC headers would have been present there in addition to WinAPI. For instance, see in this project file

    As for the documentation, try to check this article from MSDN blog, it explains the meaning of some of the tags. And here are the guidelines for working with project properties. Note that those properties are supposed to be viewed and edited from the UI, so a structure of a real *.vcxproj file may not seem to you extremely friendly or human-readable.