ryudice
ryudice

Reputation: 37366

Copy assemblies to build directory using MSBuild task

I'm new to MSBuild and was wondering how could you copy all files in your lib directory to your build directory? if you could point to some online resource that would be fine.

Upvotes: 1

Views: 656

Answers (2)

k3b
k3b

Reputation: 14755

visual studio uses ItemGroup/Reference and ItemGroup/Content for this

<ItemGroup>
<Reference Include="nunit.framework,...">
  <HintPath>..\..\..\lib\nunit.framework.dll</HintPath>
</Reference>

<Content Include="TestData\nwind.mdb">
  <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

Upvotes: 0

Chandu
Chandu

Reputation: 82893

You can use a copy task. Refer to this URL(definition and example): http://msdn.microsoft.com/en-us/library/3e54c37h.aspx

Upvotes: 1

Related Questions