Transforms are not arbitrary, but are limited by special syntax in which all transform modifiers must be in the format %(ItemMetaDataName). Any item metadata can be used as a transform modifier. This includes the well-known item metadata that is assigned to every item when it is created. For a list of well-known item metadata, see MSBuild Well-known Item Metadata.
In the following example, a list of .resx files is transformed into a list of .resources files. The %(filename) transform modifier specifies that each .resources file has the same file name as the corresponding .resx file.
@(RESXFile->'%(filename).resources')
Note: |
|---|
You can specify a custom separator for a transformed item collection in the same way you specify a separator for a standard item collection. For example, to separate a transformed item collection by using a comma (,) instead of the default semicolon (;), use the following XML.
|
@(RESXFile->'Toolset\%(filename)%(extension)', ',')
For example, if the items in the @(RESXFile) item collection are Form1.resx, Form2.resx, and Form3.resx, the outputs in the transformed list will be Form1.resources, Form2.resources, and Form3.resources.