単一のプロパティにセミコロンが含まれている場合、MSBuildは、アイテムグループ内で使用されると、プロパティをプロパティのリストに自動的に解析します。これが私のプロジェクトの抜粋です。
<PropertyGroup>
<ConnectionString>workstation id=.;packet size=4096;Integrated Security=SSPI;data source=.;initial catalog=$(SqlDbName)</ConnectionString>
</PropertyGroup>
<ItemGroup>
<InstallShieldProperties Include="
CONNECTIONSTRING=$(ConnectionString);
Another=$(value)"/>
</ItemGroup>
タスクが@(InstallShieldProperties)アイテムグループを消費すると、MSBuildは、セミコロンが含まれているため、ConnectionStringプロパティをサブセットプロパティのリストに解析します。
foreach (string property in Properties)
{
// Properties array parsed to pieces
}
アイテムグループの区切り文字を変更できることはわかっていますが、違いはありません。カスタムタスク内でstring[]配列を操作しないようにしています。