Problem running NUnit with MSBuild


I am using F# with NUnit and MSBuild.
If I use the sln2008-runner in Team City with the integrated NUnit-Runner everything works fine, but if I use my msbuild-script TeamCity (or Nunit) is ignoring all tests (because of abstract classes).
If I run the build-script manually Nunit runs all tests.

This is my build script:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="">
  <!-- Import the MSBuild Tasks -->
  <Import Project="c:\Program Files (x86)\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <ProjectDir>src\app\NaturalSpecLib</ProjectDir >
    <ProjectTestDir>src\test\Spec.NaturalSpec</ProjectTestDir >
    <ProjectFile>$(ProjectDir)\NaturalSpecLib.fsproj</ProjectFile >

  <!-- Build projects by calling the Project files generated by VS -->
  <Target Name="Build" >
    <MSBuild Projects="$(ProjectFile)"   />
    <MSBuild Projects="$(TestProjectFile)" />

  <!-- Run Unit tests -->
  <Target Name="Test" DependsOnTargets="Build">
    <CreateItem Include="$(ProjectTestDir)\$(ClassLibraryOutputDirectory)\Spec.NaturalSpec.dll">
      <Output TaskParameter="Include" ItemName="TestAssembly" />
    <NUnit Assemblies="@(TestAssembly)" ToolPath="$(NUnit-ToolPath)" />

If needed I could create a minimal sample.

Best regards,

Please sign in to leave a comment.