0
我有一個目錄作爲命令行參數傳遞給power shell腳本。我需要遞歸搜索csprj
擴展名的文件,並檢查HintPath
節點是否出現在Project/ItemGroup/Reference節點下。如果HintPath
節點存在,請與價值False
和退出,錯誤代碼0命名Private
另一個節點的存在可能有多個參考節點的ItemGroup如果存在另一個xml節點,檢查是否存在xml節點
是否有可能創建一個電源外殼腳本來做到這一點?下面
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="3.5">
<ItemGroup>
<Reference Include="IronPython, Version= ...">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\shared\IronPython-1.1\IronPython.dll</HintPath>
</Reference>
<Reference Include="log4net, Version= ...">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\binaries\log4net.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
</Project>