PC Review


Reply
Thread Tools Rate Thread

How to compile NUnit Test files.

 
 
d2d
Guest
Posts: n/a
 
      7th Sep 2003
How are you doing there folks?

I just have this newbie question about how to compile an NUnit test file
from command line using "csc.exe"

I installed NUnit 2.1 using *.msi file.
I was following examples that came with NUnit and when I tried to
compile Nunit test file here is the error i received:

========================================================================

Directory of G:\programming\c#\ff\test\NUnit

09/07/2003 12:42 PM <DIR> .
09/07/2003 12:42 PM <DIR> ..
09/06/2003 11:56 PM 424 AccountTest.cs
09/06/2003 11:51 PM 425 Bank.cs
09/07/2003 12:42 PM 3,072 Bank.dll

G:\programming\c#\ff\test\NUnit>csc /target:library /lib:Bank.dll
AccountTest.cs

Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

AccountTest.cs(3,8): error CS0246: The type or namespace name 'NUnit'
could not be found (are you missing a using directive or an assembly
reference?)
AccountTest.cs(8,4): error CS0246: The type or namespace name 'Test'
could not be found (are you missing a using directive or an assembly
reference?)
AccountTest.cs(5,3): error CS0246: The type or namespace name
'TestFixture' could not be found (are you missing a using directive or
an assembly reference?)

========================================================================

I have no clue how to deal with this.. Went through other forums and
documents but have been unsuccessful on compile that AccountTest.cs file.

I would appreciate your help
Thank you in advance.

>> sung <<


 
Reply With Quote
 
 
 
 
Joshua Coady
Guest
Posts: n/a
 
      7th Sep 2003
In article <oxJ6b.4573$(E-Mail Removed)>,
(E-Mail Removed) says...
How are you doing there folks?

I just have this newbie question about how to compile an NUnit test file
from command line using "csc.exe"

I installed NUnit 2.1 using *.msi file.
I was following examples that came with NUnit and when I tried to
compile Nunit test file here is the error i received:

========================================================================

Directory of G:\programming\c#\ff\test\NUnit

09/07/2003 12:42 PM <DIR> .
09/07/2003 12:42 PM <DIR> ..
09/06/2003 11:56 PM 424 AccountTest.cs
09/06/2003 11:51 PM 425 Bank.cs
09/07/2003 12:42 PM 3,072 Bank.dll

G:\programming\c#\ff\test\NUnit>csc /target:library /lib:Bank.dll
AccountTest.cs

Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

I think a fix for that was mentioned in the readme for the particlar examples that ar included with the install (look for the readme in the sample folders).

Josh

AccountTest.cs(3,8): error CS0246: The type or namespace name 'NUnit'
could not be found (are you missing a using directive or an assembly
reference?)
AccountTest.cs(8,4): error CS0246: The type or namespace name 'Test'
could not be found (are you missing a using directive or an assembly
reference?)
AccountTest.cs(5,3): error CS0246: The type or namespace name
'TestFixture' could not be found (are you missing a using directive or
an assembly reference?)

========================================================================

I have no clue how to deal with this.. Went through other forums and
documents but have been unsuccessful on compile that AccountTest.cs file.

I would appreciate your help
Thank you in advance.

>> sung <<



 
Reply With Quote
 
Neno Loje [MSP]
Guest
Posts: n/a
 
      7th Sep 2003
Add the reference to NUnit.Framework.dll when compiling, e.g.

G:\programming\c#\ff\test\NUnit>csc /target:library /lib:Bank.dll
/r:c:\nunit2\nunit.framework.dll
AccountTest.cs


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Failing unit test[Nunit] Sreenivas Microsoft C# .NET 6 18th May 2009 12:06 PM
Trying to nunit test a form David Thielen Microsoft Dot NET Framework Forms 5 10th Sep 2008 03:10 PM
NUnit Test Ether.Sysu Microsoft C# .NET 5 16th Apr 2006 05:26 PM
Nunit test post Tom Microsoft Dot NET 0 18th Apr 2005 04:57 AM
NUnit Documenting the test geoffblanduk_nospam@yahoo.co.uk Microsoft C# .NET 4 8th Mar 2005 03:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:59 PM.