Configuring Team build using XUnit [From client] – Update.

In my previous post , i mentioned about configuring Team build along with XUnit without installing anything on the build machine. This is sometimes useful as the build machine is miles away and is shared among other projects  and you don’t want to mess things up installing your stuffs.

Now, inside the TeamBuildTypes folder you can add your referenced dlls which you can use in your MSBuild target file to do automated test, which is on the other hand is referenced in TFSBuild.Proj file.

Now, It’s fine, but let’s say i want to organize my folders a little bit and occasionally want to drop the docs along with current build  from the source or any other folder that is necessary. To do so, we can visually customize it from Builds –> My Build –> Edit Build Definition –> Workspaces.

 

BuildWorkspace

 

Here, MyRoot is the root in my TFS setup where MyFolder is the one under which i have CodeBase, Build, Help , etc. By default, as sources get into a temp folder before the build starts , all the files from solution directory will be get and is entered under workspace folders automatically as you select your project file.  But if you want to get a Help file or reference assembly , in this case  XUnit MsBuild dlls then you have to specify it in this wizard, if you don’t want to have them under TeamBuildTypes/MyDefinationName folder.

Finally, from the previous XUniBuild.Targets our reference path will change like:

   1:    <UsingTask  AssemblyFile="$(SolutionRoot)\MyFolder\Build\xunit.runner.msbuild.dll"
   2:     TaskName="Xunit.Runner.MSBuild.xunit"/>
 
Or copy docs from
 
   1:  <Copy SourceFiles="$(SolutionRoot)\MyFolder\Help\MyDoc.docx" DestinationFiles="$(OutDir)\Docs\MyDoc.docx" /> 

 

Here , $(SolutionRoot) is the temp folder where items to be get according to the  workspace setup, where you can add/ modify items as you want and you can also see how its going from BuildLog that is dropped after each build to the root of your drop folder.

 

If you missed the previous post , here it is again:

http://weblogs.asp.net/mehfuzh/archive/2009/08/25/configuring-team-build-using-xunit.aspx

 

Hope that helps

Shout it

No Comments