MSBuild: copy whole folder

Specify your ItemGroup for SourceFiles explicitly.

<ItemGroup>
    <_CopyItems Include="$(TargetDir)\*.*" />
</ItemGroup>
<Copy
    SourceFiles="@(_CopyItems)"
    DestinationFolder="$(BuildOutput)\SomeDir"
    />

Note that _CopyItems is an item type, so it’s referenced using ‘@’ symbol rather than ‘$’.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)