Click here to Skip to main content
15,893,668 members
Articles / Programming Languages / C#

How to quickly debug a NUnit test in Visual Studio

Rate me:
Please Sign up or sign in to vote.
4.67/5 (6 votes)
30 Sep 2009CPOL5 min read 46.1K   445   21  
An article on quickly debugging NUnit tests.
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>9.0.30729</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{8CFCD272-4FFE-4C2A-BEF4-C354FB2F1A85}</ProjectGuid>
    <OutputType>Library</OutputType>
    <StartupObject>
    </StartupObject>
    <NoStandardLibraries>false</NoStandardLibraries>
    <AssemblyName>Jonno.AddIns.NunitHelper</AssemblyName>
    <RootNamespace>Jonno.AddIns.NunitHelper</RootNamespace>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <SccProjectName>
    </SccProjectName>
    <SccLocalPath>
    </SccLocalPath>
    <SccAuxPath>
    </SccAuxPath>
    <SccProvider>
    </SccProvider>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <Optimize>false</Optimize>
    <OutputPath>bin\</OutputPath>
    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <WarningLevel>4</WarningLevel>
    <IncrementalBuild>false</IncrementalBuild>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugSymbols>false</DebugSymbols>
    <Optimize>true</Optimize>
    <OutputPath>bin\</OutputPath>
    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
    <DefineConstants>TRACE</DefineConstants>
    <WarningLevel>4</WarningLevel>
    <IncrementalBuild>false</IncrementalBuild>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Extensibility, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    <Reference Include="Microsoft.VisualStudio.CommandBars, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.CommandBars.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Core">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Properties\AssemblyInfo.cs">
      <SubType>Code</SubType>
    </Compile>
    <Compile Include="Connect.cs">
      <SubType>Code</SubType>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <COMReference Include="EnvDTE">
      <Guid>{80CC9F66-E7D8-4DDD-85B6-D9E6CD0E93E2}</Guid>
      <VersionMajor>8</VersionMajor>
      <VersionMinor>0</VersionMinor>
      <Lcid>0</Lcid>
      <WrapperTool>primary</WrapperTool>
      <Isolated>False</Isolated>
    </COMReference>
    <COMReference Include="EnvDTE80">
      <Guid>{1A31287A-4D7D-413E-8E32-3B374931BD89}</Guid>
      <VersionMajor>8</VersionMajor>
      <VersionMinor>0</VersionMinor>
      <Lcid>0</Lcid>
      <WrapperTool>primary</WrapperTool>
      <Isolated>False</Isolated>
    </COMReference>
    <COMReference Include="stdole">
      <Guid>{00020430-0000-0000-C000-000000000046}</Guid>
      <VersionMajor>2</VersionMajor>
      <VersionMinor>0</VersionMinor>
      <Lcid>0</Lcid>
      <WrapperTool>primary</WrapperTool>
      <Isolated>False</Isolated>
    </COMReference>
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\Jonno.AddIns.Entities\Jonno.AddIns.Entities.csproj">
      <Project>{3BA2718C-54E3-4CF8-866A-1B23AEACFE29}</Project>
      <Name>Jonno.AddIns.Entities</Name>
    </ProjectReference>
    <ProjectReference Include="..\Jonno.AddIns.Logic.EnvDTE\Jonno.AddIns.Logic.VisualStudioSpecific.csproj">
      <Project>{39B21496-0DE2-478D-85DF-28CDA2FCE66B}</Project>
      <Name>Jonno.AddIns.Logic.VisualStudioSpecific</Name>
    </ProjectReference>
    <ProjectReference Include="..\Jonno.Extensions\Jonno.Extensions.csproj">
      <Project>{F6378323-9C83-4B10-A1C4-37EA057B3AA6}</Project>
      <Name>Jonno.Extensions</Name>
    </ProjectReference>
    <ProjectReference Include="..\Jonno.Utilities\Jonno.Utilities.csproj">
      <Project>{A7698575-84F3-435C-B97B-4F16CF84C84F}</Project>
      <Name>Jonno.Utilities</Name>
    </ProjectReference>
  </ItemGroup>
  <ItemGroup>
    <Content Include="..\..\Documents and Settings\your user name\My Documents\Visual Studio 2008\Addins\Jonno Nunit Helper.AddIn">
      <Link>Jonno Nunit Helper.AddIn</Link>
    </Content>
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
  <PropertyGroup>
    <PreBuildEvent>
    </PreBuildEvent>
    <PostBuildEvent>
    </PostBuildEvent>
  </PropertyGroup>
  <ProjectExtensions>
    <VisualStudio>
    </VisualStudio>
  </ProjectExtensions>
</Project>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United Kingdom United Kingdom
I have over 15 years of development experience, in many different languages, programming styles and platforms. Currently working as a C# coder, and residing in north Herts in the UK. I love lean software development and anything that reduces a grind to leave more time for useful coding!

Comments and Discussions