我有這樣的Msbuild XML文件。如果元數據相同,如何合併爲單個屬性?
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Notifications Include="[email protected]"/>
</ItemGroup>
<ItemGroup>
<Xcopy Include="..\..\..\Release\UtilitiesAssembly.dll">
<Destination>"..\..\..\Mycomponent\depl\BOM\Folder1</Destination>
</Xcopy>
<Xcopy Include="..\..\..\Release\Core.assembly.dll">
<Destination>"..\..\..\Mycomponent\depl\BOM\Folder1</Destination>
</Xcopy>
<Xcopy Include="..\..\..\Release\UIAssembly.dll">
<Destination>"..\..\..\Anothercomponent\Folder1</Destination>
</Xcopy>
<Xcopy Include="..\..\..\Release\Core.assembly.dll">
<Destination>"..\..\..\Anothercomponent\depl\BOM</Destination>
</Xcopy>
</Itemgroup>
</Project>
其實我想組的XCopy的ItemGroup這樣
<Xcopy Include="..\..\..\Release\UtilitiesAssembly.dll;
..\..\..\Release\\Core.assembly.dll;">
<Destination>"..\..\..\Mycomponent\depl\BOM\Folder1</Destination>
</Xcopy>
<Xcopy Include="..\..\..\Release\UIAssembly.dll;">
<Destination>"..\..\..\Anothercomponent\Folder1</Destination>
</Xcopy>
<Xcopy Include="..\..\..\Release\Core.assembly.dll">
<Destination>"..\..\..\Anothercomponent\depl\BOM</Destination>
</Xcopy>
如何使用PowerShell或的MSBuild或其他一些機制
我得到以下問題哥們。無法將值「E:\ Powershellscripts \ Comp1.Targets」轉換爲鍵入「System.Xml.XmlDocument」。錯誤:「根級別的數據無效,行1,位置1」。 – Samselvaprabu 2012-01-16 11:31:21
我的輸入文件如下所示:<?xml version =「1.0」encoding =「utf-8」?>< ComponentNotifications Include =「[email protected]」/> 「.. \ .. \ .. \ Mycomponent \ depl \ BOM \ Folder1 Destination> 「.. \ .. \ .. \ Mycomponent \ depl \ BOM \ Folder1 Destination> –
Samselvaprabu
2012-01-16 11:42:00
我編輯了我的問題以便更好地理解 – Samselvaprabu 2012-01-16 11:46:28