How to get all resources, which copies to created binary?
I think that it is all elements like this (has CopyToOutputDirectory tag):
<ItemGroup>
<None Include="Configs\Config.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
and like this:
<ItemGroup>
<Resource Include="Resources\Icons\icon4.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\Icons\icon5.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\Icons\icon6.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="icon7.ico" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\Icons\icon8.png" />
</ItemGroup>
And I should parse all elements with tag "Resource" like this (?):
XDocument doc = XDocument.Load(filePath);
IEnumerable<XAttribute> attr = doc.Descendants().Attributes("Resource");
And another question- how to get element before CopyToOutputDirectory tag?
P.S. if it be useful- i have folder with projects(another folders). I parse all .csproj files from this folders and generate XML file with list of resources which copied to compiled binary of each project.