One question I was asked today after my SharePoint presentation was related to Team Build. The question was how do I run a specific task (i.e. build documentation) in my build?
You need to modify the TFSBuild.proj file to add your custom task
- In Source Control Explorer in your project select TeamBuildTypes, right click it and Check Out for Edit
- Double click the TFSBuild.proj file and it will open in Visual Studio
You basically have to use the MSBuild Exec task to run your command, so it might look something like:
<Target Name="AfterCompile">
<Exec Command=""C:\dir\generateDoc" "$(SolutionRoot)\MySource""/>
<Copy SourceFiles="$(SolutionRoot)\MySource\MyDoc.doc" DestinationFolder="$(OutDir)" />
</Target>
</Project>
- Save your changes, close the file and Check in your pending changes and trigger a build.
I also mentioned the tool MSBuild Sidekick by Attrice to edit your TFSBuild.proj file. Here is a screenshot:
No comments yet... Be the first to leave a reply!