I want to copy all build output files to the folder \\server\assemblies
using MSBuild, additionally to copying them to the default $(OutDir)
. I already had a look at the MSBuild target CopyFilesToOutputFolder
, but I am unsure of whether I should just go ahead and duplicate that target (or any of its subtargets).
What I am looking for, is an item list, that I can pass into the Copy
task, to achieve that behavior. This is what I currently have:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CustomOutDir>\\server\assemblies\</CustomOutDir>
</PropertyGroup>
<Target Name="AfterBuild">
<Copy SourceFiles="@(FileWrites)" DestinationFolder="$(CustomOutDir)" />
</Target>
</Project>
I don't know if @(FileWrites)
only contains all the files written to the output Folder, or if it may contain other temporary files as well. Is there another item list macro that I could use?