0
我有執行批處理文件的msbuild文件。msbuild項目組項目
的MSBuild文件:
<PropertyGroup>
<ItemAString>Green;Red;Blue</ItemAString>
<ItemBString>Uno;Due;Tre</ItemBString>
<ItemCString>Song;Movie;Picture</ItemCString>
</PropertyGroup>
<ItemGroup>
<ItemsA Include="$(ItemAString.Split(';'))" />
<ItemsB Include="$(ItemBString.Split(';'))" />
<ItemsC Include="$(ItemCString.Split(';'))" />
</ItemGroup>
<Target Name = "CallBatch">
<!-- THIS DOES NOT WORK -->
<Exec Command="mybatch.bat %(ItemsA.Identity) %(ItemsB.Identity) %(ItemsC.Identity)" />
</Target>
批處理文件非常簡單:
echo Params = [%1] - [%2] - [%3]
我想下一個輸出:
Params = Green - Uno - Song
Params = Red - Due - Movie
Params = Blue - Movie - Picture
如何實現ŧ他?
如果那是正確的不知道,但你第一次訪問與'$',然後用''%變量。我沒有進入msbuild,但跳到我的眼睛。 – geisterfurz007
搜索「跨產品」,答案應該在這裏的某個地方。示例:http://stackoverflow.com/questions/3893467/msbuild-batching-on-three-independent-variables/3893905#3893905或http://stackoverflow.com/questions/37186867/msbuild-merge-item-groups/ 37210038#37210038或... – stijn