Re: Building nunit from source for the first time
"Charlie Poole" <[email protected]> Fri, 5 Sep 2008 14:02:57 -0700
| Newsgroups | gmane.comp.windows.dotnet.nunit.devel |
|---|---|
| Message-ID | <009501c90f9a$c7ba5ef0$6401a8c0@ferrari> |
Hi, > I downloaded the most recent nunit source code from CVS and > am trying to build it. > > I'm running this command on the command line: > nant debug net-2.0 build test > > When I run this command, the build fails with the failure at > the end (snipped to the relevant failure). The error itself > is "error CS0246: The type or namespace name 'TestCases' > could not be found (are you missing a using directive or an > assembly reference?)". A great example of a one error hiding another, and causing it to build OK on my machine. If you open nunit.framework.build in the src\NUnitFramework\framework directory and change "FactoriesAttribute.cs" to "TestCasesAttribute.cs" it should build correctly. > I opened up the VS2008 solution, which built just fine from > within the IDE. When I ran the tests using ReSharper's > integrated unit test runner, a couple hundred tests failed. > The runner even crashed when it got to the > StackOverflowTestFixture.SimpleOverflow test. Resharper doesn't use the NUnit test runner to run tests, so it doesn't recognize many features added since around 2005. This has tripped up a lot of people. ;-) > So the big question is: what am I doing wrong? You should be able to run tests after buildinng with either the NAnt build or VS2008. But you'll have to use one of the NUnit runners to do it. Charlie > Thanks! > > > Here's the snipped nant build output I promised :) > > > ================================================== > [nant] > c:\Projects\NUnit\nunit20\src\NUnitFramework\tests\nunit.frame > work.tests.build build > Buildfile: > file:///c:/Projects/NUnit/nunit20/src/NUnitFramework/tests/nun > it.framework.tests.build > Target framework: Microsoft .NET Framework 2.0 > Target(s) specified: build > > > build: > > [csc] Compiling 55 files to > 'c:\Projects\NUnit\nunit20\build\net\2.0\debug\tests\nunit.fra > mework.tests.dll'. > [csc] > c:\Projects\NUnit\nunit20\src\NUnitFramework\tests\Constraints > \ConstraintTestBase.cs(16,16): error CS0246: The type or > namespace name 'TestCases' could not be found (are you > missing a using directive or an assembly reference?) > [csc] > c:\Projects\NUnit\nunit20\src\NUnitFramework\tests\Constraints > \ConstraintTestBase.cs(22,16): error CS0246: The type or > namespace name 'TestCases' could not be found (are you > missing a using directive or an assembly reference?) > [csc] > c:\Projects\NUnit\nunit20\src\NUnitFramework\tests\Constraints > \ConstraintTestBase.cs(62,16): error CS0246: The type or > namespace name 'TestCases' could not be found (are you > missing a using directive or an assembly reference?) > [csc] > c:\Projects\NUnit\nunit20\src\NUnitFramework\tests\Constraints > \ConstraintTestBase.cs(76,16): error CS0246: The type or > namespace name 'TestCases' could not be found (are you > missing a using directive or an assembly reference?) > [csc] > c:\Projects\NUnit\nunit20\src\NUnitFramework\tests\Syntax\Inva > lidCodeTests.cs(58,16): error CS0246: The type or namespace > name 'TestCases' could not be found (are you missing a using > directive or an assembly reference?) > > BUILD FAILED > > > c:\Projects\NUnit\nunit20\src\NUnitFramework\tests\nunit.frame > work.tests.build(69,6): > External Program Failed: > C:\Windows\Microsoft.NET\Framework\v2.0.50727\csc.exe (return > code was 1) > > Total time: 0.5 seconds. > ======================================== > > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/