Skip to main content

Posts

Showing posts from March, 2010

Do not create a Work Item at Build Failure

The default settings in TFSBuild.proj includes among other things that a Work Item (bug) is created whenever a build failes. This is a very useful feature, but if you do not want it this way it is possible to turn this feature off.

The definition of the CoreCreateWorkItem target in Microsoft.TeamFoundation.Build.targets looks like this:

<Target Name="CoreCreateWorkItem" Condition=" '$(SkipWorkItemCreation)'!='true' and '$(IsDesktopBuild)'!='true'" DependsOnTargets="$(CoreCreateWorkItemDependsOn)"> <PropertyGroup> <WorkItemTitle>$(WorkItemTitle) $(BuildNumber)</WorkItemTitle> ... </PropertyGroup> <CreateNewWorkItem TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildUri="$(BuildUri)" BuildNumber="$(BuildNumber)" Description="$(WorkItemDescription)" TeamProject="$(TeamProject)…

NUnit in Team Foundation Build

Not everyone have embraced Microsofts testing platform, but prefer to use other tools for unit testing, for instance NUnit. Because this is such a common scenario there is lots of information and components to help with integrating NUnit in Team Foundation Build.

The easiest solution is to use two add-on components. MSBuild Community Tasks to make configuration easier and NUnit for Team Build to integrate the testresults in the build log and get the results in reports. Both of these components are open source and free to download.

Begin with installing NUnit, MSBuild Community Tasks and NUnit for Team Build. After that only some changes in TFSBuild.proj are needet to get a really nice integration of NUnit in Team Foundation Server.

Import MSBuild Community Tasks by adding the following row:

<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.targets" />
Now we have the possibility to use every task that is defined in the imported file…