473,473 Members | 1,818 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

NUnit problems building example

Hi,

I'm a newbie so sorry if there is a simple answer to this! I'm using C#
in Visual Studio Express at the moment.

I've downloaded NUnit v 2.2.8 and can load and run the tests they
supply (e.g. nunit.util.tests.dll) so the install of NUnit seems OK.

I've compiled one of the sample projects (csharp-sample_VS2005). When I
do so I get the following warning after a build:

Found conflicts between different versions of the same dependent
assembly.

Note: I get this error even after removing and re-adding the reference
to nunit.framework.dll as described in the readme.txt file. The build
does succeed though.
When I try and load the csharp-sample.dll into the NUnit GUI program I
get the following error dialog:

System.BadImageFormatException: The format of the file 'csharp-sample'
is invalid.

You may be attempting to load an assembly built with a later version of
the CLR than the version under which NUnit is currently running,
1.1.4322.
Does this mean that NUnit cannot be used with VS 2005? I've searched
the newsgroups and it seems to be used by people with VS 2005.

For info, the test project references 4 files:

nunit.framework (v1.1.4322)
System (v1.0.3705)
System.Data (v1.0.3705)
System.XML (v1.0.3705)
Any help would be appreciated!

John.

Oct 26 '06 #1
2 5140
Looks like everything works, except you're trying to run a 2.0 assembly
where NUnit expects a 1.1. Check in the config files as described in
the Configuration section of:

http://nunit.org/index.php?p=installation&r=2.2.8

Stephan
Jo********@hotmail.co.uk wrote:
Hi,

I'm a newbie so sorry if there is a simple answer to this! I'm using C#
in Visual Studio Express at the moment.

I've downloaded NUnit v 2.2.8 and can load and run the tests they
supply (e.g. nunit.util.tests.dll) so the install of NUnit seems OK.

I've compiled one of the sample projects (csharp-sample_VS2005). When I
do so I get the following warning after a build:

Found conflicts between different versions of the same dependent
assembly.

Note: I get this error even after removing and re-adding the reference
to nunit.framework.dll as described in the readme.txt file. The build
does succeed though.
When I try and load the csharp-sample.dll into the NUnit GUI program I
get the following error dialog:

System.BadImageFormatException: The format of the file 'csharp-sample'
is invalid.

You may be attempting to load an assembly built with a later version of
the CLR than the version under which NUnit is currently running,
1.1.4322.
Does this mean that NUnit cannot be used with VS 2005? I've searched
the newsgroups and it seems to be used by people with VS 2005.

For info, the test project references 4 files:

nunit.framework (v1.1.4322)
System (v1.0.3705)
System.Data (v1.0.3705)
System.XML (v1.0.3705)
Any help would be appreciated!

John.
Oct 26 '06 #2
Stephan,

Thank you very much indeed! It is now working as I expect.

John.

Oct 26 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Peter Rilling | last post by:
My development team is using VS.NET with VSS integration. They are able to check in and out from within VS.NET. We also use NUnit for testing our libraries. Currently our entire solution is...
3
by: Frank Rizzo | last post by:
Here is the situation. I have a DLL that implements needed functionality. I'll refer to it as Business.dll. It depends on an XML (it contains config info) file being in the same directory as the...
0
by: Greg Bacon | last post by:
I have two C# projects: a production project and NUnit tests for it. I've recently added a test that causes a call into a registered COM component, and now the test fails with a TypeLoadException...
0
by: W. Schwenkner | last post by:
I use the NUnit VS addin intensivly in development C# projects. Now I have to write a project in managed C++ and I have problems with the NUnit addin. First, the Addin extends the context menu...
4
by: Mark | last post by:
I'm building some NUnit tests for the business classes in my ASP.NET application. Some of the business classes use Session to store information. NUnit does not generate a Session, so the code...
0
by: fishball79 | last post by:
Hi all, I'm encountering a weird problem. I am attempting to run NUnit tests on web services (developed on .net framework 1.1) hosted on a seperate machine on the intranet. I can access the...
3
by: JJ | last post by:
Hi, In Nunit testing with asp.net are you guys creating a separate Test assembly for testing or integrating right in class themselves? Is anyone using a third party Unit Test addon for Nunit to...
1
by: MD | last post by:
Hello I work in a .NET environment and I am about to create a development strategy. As part of this I am looking at implementing a testing tool to fit in with an iterative approach and NUnit...
6
by: tchaiket | last post by:
Hey all, I'm using NUNIT to test our classes. However, I don't want to hard code test data into the NUNIT classes. For example, to test adding a new Client, I don't want to hard code the...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.