Thursday, July 26, 2007

Using our Task we built earlier

Using our Task we built in Automating your Team Builds with Team Foundation Server we are now going to configure it within the build project file. To start off we need to reference the compiled dll.

<UsingTask TaskName="Microsoft.Sdc.Tasks.File.Execute"
AssemblyFile="C:\TaskBuilds\Microsoft.Sdc.Tasks.dll" />


Lets say after the source is compiled you are now ready to execute an external application you wrote to configure an Web Site or something using the compiled output code you could do something like this:



<Target Name="AfterCompile">
<File.Execute TreatErrorsAsWarnings="true"
File="C:\MyFilePath\myfile.exe"
CommandLineArgs="-ws $(BinariesRoot)" />
</Target>
Here the MSBUILD engine will call your File.Execute method
after it has finished compiling the solution.





No comments:

 
Creative Commons License
Blogged Information and Code is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.