472,779 Members | 2,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,779 software developers and data experts.

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 14177
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tom | last post by:
Hi guys I am writing a Nunit test script. But on the form that I am writing the script on I have an auto post back drop down list which if clicked on will post back and dynamically load a check...
5
by: Ether.Sysu | last post by:
hi I'm new to NUnit. Is there any way to test a private method with NUnit? thanks!
3
by: Anbu | last post by:
Hi All, I have 5 test cases (b, c, a, d & e) , NUnit picks up the in alphabatical order. I want to execute the test case e first before the exection of other function. Is there any way to...
0
by: angshuman.agarwal | last post by:
Hi, I have a owner drawn combo box (using .Net 2.0 Framework). I have written the Nunit test for the same. I am setting the AutoCompleteSource Property (AutoCompleteSource.CustomSource) and...
6
by: sam | last post by:
Hi, I want to compile and test php script in my pc without using internet or web site which is online ? Do you have any idea about it? It is possible to do that ?
1
by: Udi | last post by:
Hi, I need to copy several files as a post build step of the Test project, to the 'Out' directory of a running test. (The current directory of a running test) Is there any simple way of knowing...
2
by: honavar | last post by:
Hi all, I have written Nunit test case using C#. I am testing the classes of some XYZ driver. I am using same database located in different server for example server1 and server2. My config...
5
by: =?Utf-8?B?THVpZ2k=?= | last post by:
Hi all, with NUnit (C#) which is the better way to implement some tests to operate on a file in the file system? For instance: file exists, file read and file write. Thanks in advance. --...
3
by: abhinuke | last post by:
So here I am,working on some code which requires me to compile two files and one object code files together. Here is the skeleton of my code in file.cpp #include<iostream> class someclass{...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.