Re: Could not load file or assembly nunit.framework

"Charlie Poole" <[email protected]> Tue, 7 Oct 2008 08:09:38 -0700
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <007d01c9288e$b9606860$6401a8c0@ferrari>
This is a multi-part message in MIME format.

--===============3445530148078301229==
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_007E_01C92854.0D019060"

This is a multi-part message in MIME format.

------=_NextPart_000_007E_01C92854.0D019060
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

I see only one copy of this one!
 
In Win32 there is a Path that is searched for assemblies. Java has a
ClassPath.
People new to .NET are often surprised that there is no such thing. If this
is 
new to you, you may want to look at some basic reference material. Here's
one: http://www.grimes.demon.co.uk/workshops/fusionWS.htm or search
on MSDN.
 
However, this doesn't really answer your question, which could be rephrased
"Why isn't the nunit framework assembly installed in a standard location
that
.NET knows about?"
 
That's because of how we view it. The nunit.framework.dll, in spite of its
name, isn't really "part of" NUnit. For example, no other assemblies, with
the exception of our own tests, contain a reference to nunit.framework. You
could actually replace it with your own code, provided you used the same
names. So, like other pieces of your app, you have to make sure the 
framework is installed before you can run it.
 
Many IDEs take care of this for you by copying nunit.framework into
the target directory. My own NAnt build does this so that it can run
the tests. That's what you have to do.
 
It's likely that this will change in the future. You're not the first person
to ask about it or to find how we have treated it confusing. :-) But,
for now, treat nunit.framework just like any (other) library that makes
up part of your application, and copy it somewhere it can be found
by .NET.
 
Charlie


  _____  

From: T P [mailto:[email protected]] 
Sent: Monday, October 06, 2008 9:47 PM
To: [email protected]
Subject: Re: [Nunit-users] Could not load file or assembly nunit.framework


Hi, I hope this account works better.

I guess I'm confused about what it takes to make assemblies available at run
time.  Do you mean I have to copy all needed assemblies into the same
directory?  Wouldn't it make more sense to have a search path?

I am using WinXP and nant so I am mainly using the command line.  I also use
the gui occasionally.

Adam





------=_NextPart_000_007E_01C92854.0D019060
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<STYLE type=3Dtext/css>DIV {
	MARGIN: 0px
}
</STYLE>

<META content=3D"MSHTML 6.00.6000.16705" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D812125214-07102008>I see=20
only one copy of this one!</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D812125214-07102008></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D812125214-07102008>In=20
Win32 there is a Path that is searched for assemblies. Java has a=20
ClassPath.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D812125214-07102008>People=20
new to .NET are often surprised that there is no such thing. If this is=20
</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D812125214-07102008>new to=20
you, you may want to look at some basic reference material.=20
Here's</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D812125214-07102008>one:=20
<A=20
href=3D"http://www.grimes.demon.co.uk/workshops/fusionWS.htm">http://www.=
grimes.demon.co.uk/workshops/fusionWS.htm</A>&nbsp;or=20
search</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D812125214-07102008>on=20
MSDN.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D812125214-07102008></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D812125214-07102008>However, this doesn't really answer your =
question,=20
which could be rephrased</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D812125214-07102008>"Why=20
isn't the nunit framework assembly installed in a standard location=20
that</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D812125214-07102008>.NET=20
knows about?"</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D812125214-07102008></SPAN></FONT>&nbsp;</DIV>
<DIV><SPAN class=3D812125214-07102008></SPAN><FONT face=3DArial><FONT=20
color=3D#0000ff><FONT=20
size=3D2>That's&nbsp;because&nbsp;of&nbsp;how&nbsp;we&nbsp;view&nbsp;it.&=
nbsp;The&nbsp;nunit.framework.dll,&nbsp;in&nbsp;spite&nbsp;of&nbsp;its</F=
ONT></FONT></FONT></DIV>
<DIV><FONT><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D812125214-07102008></SPAN></FONT></FONT></FONT><SPAN=20
class=3D812125214-07102008></SPAN><FONT face=3DArial><FONT =
color=3D#0000ff><FONT=20
size=3D2>n<SPAN class=3D812125214-07102008>ame, isn't really "part of" =
NUnit. For=20
example, no other assemblies, with</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D812125214-07102008></SPAN></FONT></FONT></FONT><SPAN=20
class=3D812125214-07102008></SPAN><FONT face=3DArial><FONT =
color=3D#0000ff><FONT=20
size=3D2>t<SPAN class=3D812125214-07102008>he exception of our own =
tests, contain a=20
reference to nunit.framework. You</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D812125214-07102008></SPAN></FONT></FONT></FONT><SPAN=20
class=3D812125214-07102008></SPAN><FONT face=3DArial><FONT =
color=3D#0000ff><FONT=20
size=3D2>c<SPAN class=3D812125214-07102008>ould actually replace it with =
your own=20
code, provided you used the same</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D812125214-07102008></SPAN></FONT></FONT></FONT><SPAN=20
class=3D812125214-07102008></SPAN><FONT face=3DArial><FONT =
color=3D#0000ff><FONT=20
size=3D2>n<SPAN class=3D812125214-07102008>ames. So, like other pieces =
of your app,=20
you have to make sure the </SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D812125214-07102008></SPAN></FONT></FONT></FONT><SPAN=20
class=3D812125214-07102008></SPAN><FONT face=3DArial><FONT =
color=3D#0000ff><FONT=20
size=3D2>f<SPAN class=3D812125214-07102008>ramework is installed before =
you can run=20
it.</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D812125214-07102008></SPAN></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D812125214-07102008>Many IDEs take care of this for you by =
copying=20
nunit.framework into</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D812125214-07102008>the target directory. My own NAnt build does =
this so=20
that it can run</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D812125214-07102008>the tests. That's what you have to=20
do.</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D812125214-07102008></SPAN></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D812125214-07102008>It's likely that this will change in the =
future. You're=20
not the first person</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D812125214-07102008>to ask about it or to find how we have =
treated it=20
confusing. :-) But,</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D812125214-07102008>for now, treat nunit.framework just like any =
(other)=20
library that makes</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D812125214-07102008>up part of your application, and copy it =
somewhere it=20
can be found</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D812125214-07102008>by .NET.</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D812125214-07102008></SPAN></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D812125214-07102008>Charlie</SPAN></FONT></FONT></FONT></DIV>
<DIV><BR></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid; MARGIN-RIGHT: 0px">
  <DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft>
  <HR tabIndex=3D-1>
  <FONT face=3DTahoma size=3D2><B>From:</B> T P =
[mailto:[email protected]]=20
  <BR><B>Sent:</B> Monday, October 06, 2008 9:47 PM<BR><B>To:</B>=20
  [email protected]<BR><B>Subject:</B> Re: [Nunit-users] =
Could=20
  not load file or assembly nunit.framework<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV=20
  style=3D"FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, =
times, serif">
  <DIV>Hi, I hope this account works better.<BR><BR>I guess I'm confused =
about=20
  what it takes to make assemblies available at run time.&nbsp; Do you =
mean I=20
  have to copy all needed assemblies into the same directory?&nbsp; =
Wouldn't it=20
  make more sense to have a search path?<BR><BR>I am using WinXP and =
nant so I=20
  am mainly using the command line.&nbsp; I also use the gui=20
  =
occasionally.<BR><BR>Adam<BR><BR></DIV></DIV><BR></BLOCKQUOTE></BODY></HT=
ML>

------=_NextPart_000_007E_01C92854.0D019060--




--===============3445530148078301229==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
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=/
--===============3445530148078301229==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Nunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nunit-users

--===============3445530148078301229==--