I have a directory passed as a command line parameter to the power shell script . I need to recursively search for files with csprj extension and check whether HintPath node is present under Project /ItemGroup/Reference node. If HintPath node is present, check the presence of another node named Private with value False and exit with error code 0. There could be multiple Reference nodes under ItemGroup
Is it possible to create a power shell script to do this? A sample xml file is given below
<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>
Should give you an overview like this: