In Csproj I have the following section:
<ItemGroup>
<Content Include="C\MyPath\**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>Res\%(RecursiveDir)%(Filename)%(Extension)</Link>
</Content>
Thus if C\MyPath\ has a following structure:
-C
-MyPath
-f1.txt
-folder1
-f3.txt
-folder4
-folder2
-f4.txt
-folder5
I don`t want exactly the recursive copy but I want folder1 and folder2 not to be generated but rather start recursive copy from the second level:
-Res
- f1.txt
- f3,txt
- folder4
- f4.txt
- folder5
How can I do it without copying from each folder separately:
<Content Include="C\MyPath\folder1\**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>Res\%(RecursiveDir)%(Filename)%(Extension)</Link>
</Content>
<Content Include="C\MyPath\folder2\**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>Res\%(RecursiveDir)%(Filename)%(Extension)</Link>
</Content>