MSBuild Well-known Item Metadata
The following table describes the metadata assigned to every item upon creation. In each example, the following item declaration was used to include the file C:\MyProject\Source\Program.cs in the project.
<ItemGroup> <MyItem Include="Source\Program.cs" /> </ItemGroup>
Contains the full path of the item. For example:
Contains the root directory of the item. For example:
Contains the file name of the item, without the extension. For example:
Contains the file name extension of the item. For example:
Contains the path specified in the Include attribute, up to the final backslash (\). For example:
Contains the directory of the item, without the root directory. For example:
If the Include attribute contains the wildcard **, this metadata specifies the part of the path that replaces the wildcard. For more information on wildcards, see How to: Select the Files to Build.
If the folder C:\MySolution\MyProject\Source\ contains the file Program.cs, and if the project file contains this item:
<MyItem Include="C:\**\Program.cs" />
then the value of %(MyItem.RecursiveDir) would be MySolution\MyProject\Source\.
The item specified in the Include attribute.. For example:
Contains the timestamp from the last time the item was modified. For example:
Contains the timestamp from when the item was created. For example:
Contains the timestamp from the last time the item was accessed.