0
バッチファイルを実行しているmsbuildファイルがあります。msbuild itemgroup items
の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