Visual Studio 2003-2008 Express are missing Add-In support and no
ability for the debugger to attach to a process.
This brings up a problem when trying to debug your tests with Nunit.
After Testdriven.NET no longer supports the express editions, we no longer have
the possibility to run tests against code we develop in the express editions.
Well, so it seems.
But, there is still a way around this. It's not as smooth as
Testdriven.NET, but it works all right. In the folder which contains the test
library you want to debug, add a file named the same as the project, but with
the extension ".csproj.user". This is the content of one of my files:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Nunit|AnyCPU' ">
<EnableASPDebugging>false</EnableASPDebugging>
<EnableASPXDebugging>false</EnableASPXDebugging>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
<RemoteDebugEnabled>false</RemoteDebugEnabled>
<RemoteDebugMachine>
</RemoteDebugMachine>
<StartAction>Program</StartAction>
<StartArguments/>
<StartPage>
</StartPage>
<StartProgram>tools\nunit\nunit.exe</StartProgram>
<StartURL>
</StartURL>
<StartWorkingDirectory>
</StartWorkingDirectory>
<StartWithIE>false</StartWithIE>
</PropertyGroup>
</Project>
I have created my own solution configuration in VS.NET called Nunit. It
is used when running the tests.
You can of course use the default configuration; DEBUG if you want to. Then you
have to change a line in the content:
'...$(Platform)' == 'Nunit|AnyCPU'
">'
to
'...$(Platform)' == 'Debug|AnyCPU' ">'.
This worked perfectly for me.
Tags: