.net – Can’t test with NUnit on Vista 64bit

.net-3.564-bitnetnunit

I encountered the problem while trying to run unit testing with NUnit 2.5 in Vista 64bit, MS Visual Studio 2008 SP1, Projects framework 3.5.

I have 2 projects in solution, the first – main project and the second – project with tests. Both projects targeted "Any CPU" platform. In fact, I didn't changed anything concerning platform, just created two project with default settings (Any CPU).

I tried to run NUnit tests with different tools: 1) Task runner in Resharper 4.5; 2) TestDriven.NET 2.0; 3) NUnit.exe. And every time when I run unit testing I get error report from Windows saying that program (1) Task runner; 2) TestDriven.NET 2.0; 3) nunit.exe) execution was stopped. I tried to run tests with nunit-x86, and i've got the same error.

In details from Windows I saw the following string (among others):

Fault Module Name: KERNEL32.dll

Can anybody help with it? What's wrong? I can provide more details, if it helps.

Best Answer

Well, the problem was concerning neither compatibility nor architecture. I ran tests with debugger and I found, that one method caused StackOverflowException thrown from CLR library method. I don't know why NUnit doesn't catch this exception from CLR, but it doesn't. In fact, NUnit usually catches every exception and it just shows red status of test. But apparently not in this case. Anyway, thanks for help and I think that if somebody sometimes meet this issue he will not be surprised :).

Related Topic