MSBuild copy entire directory while using metadata in path names
Here are few other similar answers that I've found, but none answers my question: Copying entire project structure into another directory using afterbuild task Copy all files and folders using msbuild MSbuild Copy whole folder What I'm trying to do: I need to copy a directory tree into several different places in the project upon compilation. Here is how it presently being done: <ItemGroup> <MediaFiles Include="$(ProjectDir)media\**\*.*" /> <DeployLabel Include="$(ProjectDir)deploy\x"> <Dir>x</Dir> </DeployLabel> <DeployLabel Include="$(ProjectDir)deploy\y"> <Dir>y</Dir> </DeployLabel>