Howto setup TeamCity NUnit Runner with AutoFixture.NUnit2

In a previous post I explained how setup AutoFixture.NUnit2 to work with a few 3rd party applications, to complete the AutoFixture.NUnit2 story we need to be able to configure TeamCity for Continuous integration according to Teamcity documentations there are a few ways to do this, but only way I have been successful so far was to configure msbuild script to run nunit-console.exe

Example of msbuild script to copy Teamcity NUnit Addin and AutoFixture.NUnit2.Addins.dll

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="" DefaultTargets="CompleteBuild" ToolsVersion="4.0">

    	<NUnitAddinFiles Include="$(teamcity_dotnet_nunitaddin)-2.6.2.*" />
    	<NUnitAddinFiles Include="packages\AutoFixture.NUnit2.3.9.0\lib\net40\Ploeh.AutoFixture.NUnit2.Addins.dll" />

    <Target Name="RunTests">
    	<MakeDir Directories="$(NUnitHome)\addins" />
	<Copy SourceFiles="@(NUnitAddinFiles)" DestinationFolder="$(NUnitHome)\addins" />
	<Exec Command="$(NUnitHome)\nunit-console.exe $(TestAssembly)" />

    <Target Name="CompleteBuild" DependsOnTargets="RunTests" />

One thought on “Howto setup TeamCity NUnit Runner with AutoFixture.NUnit2”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s