Tag not monitored by Microsoft.
Hi @Rudolf Meier ,
Welcome to Microsoft Q&A forum.
First of all, in MSBuild, @ denotes referencing item(s), % denotes referencing metadata and $ denotes referencing properties. For % there are some MSBuild well-known item metadata such as %(RootDir), %(Filename), %(RelativeDir) and %(Directory) etc. Also in some situation, %<xx> can be used to escape special characters.
For your first question, no, they are not the same. The -> operator is used for Item functions or for transforming something like metadata of item type.
The first line uses -> so it means transforming the metadata represented by MyItems to the right-hand side corresponding metadata. You can check more details here: MSBuild Transforms.
The second line usually means including a simple .h file. And %(…)\%(…).h represents its directory. But please note, this line may be not work, as if you want to include a simple file, even if you want to combine or custom the directory, you can reference the parts of the directory from property group instead of item group, it will be easier to understand or to check. For example <MyVal Include="$(…)\$(…).h">
For your second question, it’s a little abstract, could you share more details? Do a,b,c mean the meta data of one certain item type and x1, x2, x3 means the file to transform to? If yes, the order of the transforming is by default(the order of combination of expression can be changed), you can try to change the metadata list order in MSBuild and make them match the related file, but still, it is abstract, and I am not very sure what you really want.
Best Regards,
Tianyu
- If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.