2

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?

David Laing
  • 7,605
  • 10
  • 33
  • 44

1 Answers1

1

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.

Community
  • 1
  • 1
David Laing
  • 7,605
  • 10
  • 33
  • 44