Other Languages -> Visual C# -> Test -> Test Project
..when you're choosing the project type, Visual Studio will try and use it's own testing framework as far as I can tell. You should pick a normal C# class library project instead and then the instructions in my selected answer will work.nunit-agent.exe
using 'Debug|Attach to Process' and run the tests from the GUI. Any breakpoints in my tests (or the code they're testing) are hit. Am I misunderstanding your question, or will that work for you? SetUpFixture
class. (You can do this with older versions but you will need to do whatever equivalent that has to the SetUpFixture
, or copy it in to the test itself.)Debugger.Launch()
does is cause the following dialog to show up when you click Run inside NUnit.File -> Open Project
.dll
from bin folder (C:...[SolutionFolder][ProjectFolder]binDebugxxxxTests.dll
)Debug -> Attach to process
(Attach to process window will open)nunit-agent.exe
then click Attach
Run
on Nunit Gui
and you should get your breakpoint hit..<path>binDebugNew ProjectQuotes.Domain.Tests.dll
then enclose the Start Option --> Command Line Arguments project path in double quotes.Attach to Process
feature to attach the nunit-agent.exe.