Reputation: 7675
I have a custom task in my Web Application Project that generates some metadata files.
How can I ensure that these files are copied into the _PublishedWebsites\ folder by the TFS build?
Upvotes: 2
Views: 1510
Reputation: 7675
Simple - add a copy task to to the AfterBuild target in your .csproj file:
<Target Name="AfterBuild">
<!-- Copy metadata to _PublishedWebsites -->
<Copy Condition="('%(MetadataGenerationExitCode.identity)' == '0') And ('$(IsDesktopBuild)' == 'False')"
SourceFiles="$(OutDir)\Metadata\schema.json.js;$(OutDir)\Metadata\smd.json.js;"
DestinationFolder="$(OutDir)_PublishedWebsites\$(MSBuildProjectName)\Metadata"
SkipUnchangedFiles="false" />
</Target>
Thanks to lexx for putting me on the right track.
Upvotes: 1