469,625 Members | 1,595 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,625 developers. It's quick & easy.

How to compile NUnit Test files.

d2d
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 <<


Nov 15 '05 #1
2 14053
In article <ox****************@nwrdny03.gnilink.net>,
da*******@hotmail.com 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 <<

Nov 15 '05 #2
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
Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Tom | last post: by
5 posts views Thread by Ether.Sysu | last post: by
3 posts views Thread by Anbu | last post: by
reply views Thread by angshuman.agarwal | last post: by
6 posts views Thread by sam | last post: by
1 post views Thread by Udi | last post: by
5 posts views Thread by =?Utf-8?B?THVpZ2k=?= | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.