trying to copy a whole folder, but when i do this:
For me what worked was this: - kept folder structure - copied all files within the folder - works for any folder, doesn't have to be in the project or the same project folder
<ItemGroup>
<_CopyItems Include="<path relative to project>\**\*.*" />
</ItemGroup>
<Target Name="AfterBuild">
<Copy SourceFiles="@(_CopyItems)" DestinationFiles="@(_CopyItems->'$(OutDir)\<output folder>\%(RecursiveDir)%(Filename)%(Extension)')"/>
</Target>
legend:
<path relative to project>
: this could be any path, using ..\ for
going above the proj folder works<output folder>
: folder you want
the whole file structure to be dropped into, excluding the source
folder.$(OutDir)
will be bin\Debug or whatever build mode you have, if you want something
else, change that.