Re: SyntaxHelpers does not exist in thenamespaceNUnit.Framework- nUnit (2.2)
"Charlie Poole" <[email protected]> Tue, 9 Sep 2008 21:41:38 -0700
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <003e01c912ff$85d5edc0$6401a8c0@ferrari> |
This is a multi-part message in MIME format. --===============1182026173== Content-Type: multipart/alternative; boundary="----=_NextPart_000_003F_01C912C4.D97715C0" This is a multi-part message in MIME format. ------=_NextPart_000_003F_01C912C4.D97715C0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Hi Javier, I think it would depend on how critical the machine on which you are installing is. For safety, you could drop the entire tree into ~/nunit-2.5 and work from there. You would want to create aliases for the nunit executables for ease of use. Charlie _____ From: [email protected] [mailto:[email protected]] On Behalf Of javier fernandez Sent: Tuesday, September 09, 2008 9:30 PM To: [email protected] Subject: Re: [Nunit-users] SyntaxHelpers does not exist in thenamespaceNUnit.Framework- nUnit (2.2) Thank you for clarifying that for me. I followed your instructions about downloading the binary distribution in to a separate folder which allowed me to referenced the dll during compilation. What I would like to do is replace the nUnit version 2.2 installed by the package "mono-nunit-1.9.1-2.novell.i586.rpm" with the binary distribution I downloaded. But I'm not sure if its wise to move all of the files found in the binary folder of the downloaded distribution to the location where the current nunit version 2.2 related files are kept after I uninstall the package "mono-nunit-1.9.1-2.novell.i586.rpm" Please recommend an installation approach that anticipates for future upgrades. On Mon, Sep 8, 2008 at 8:02 PM, Charlie Poole <[email protected]> wrote: The constraint-based assertion model and syntax was introduced in NUnit 2.4, so you would have to be using a later version of NUnit for that to work. Since we don't provide the RPMs, I can't help you there. However, it's feasible to take any of our binary distributions and manually copy the assemblies to the correct location on your system, provided you have root access. Or if you don't, just copy them into directories relative to your home directory. The NUnit project will eventually provide packages for an easier Linux install, but we're not there yet. Charlie _____ From: [email protected] [mailto:[email protected]] On Behalf Of javier fernandez Sent: Monday, September 08, 2008 3:58 PM To: [email protected] Subject: [Nunit-users] SyntaxHelpers does not exist in the namespaceNUnit.Framework- nUnit (2.2) Hello, Its my first time using nUnit as well as compiling C# with mono ( 1.9 ). I installed the "mono-nunit-1.9.1-2.novell.i586.rpm", and copied an example from a book to a file for testing. But compiling the example using gmcs failed with the following error: [javier@localhost csharp]$ gmcs -debug -t:library -r:System -r:nunit.framework.dll -r:nunit.util.dll -out:Largest.dll Largest.cs LargestTest.cs LargestTest.cs(3,23): error CS0234: The type or namespace name `SyntaxHelpers' does not exist in the namespace `NUnit.Framework'. Are you missing an assembly reference? Also if I commented out the "using NUnit.Framework.SyntaxHelpers;" it complains that "Assert.That()" doesn't exists in the namespace NUnit.Framework Please advice a solution. Thanks in advance. #################### Here's what's in my GAC: gacutil -l nunit.core, Version=2.2.0.0 <http://2.2.0.0/> , Culture=neutral, PublicKeyToken=96d09a1eb7f44a77 nunit.framework, Version=2.2.0.0 <http://2.2.0.0/> , Culture=neutral, PublicKeyToken=96d09a1eb7f44a77 nunit.mocks, Version=2.2.8.0 <http://2.2.8.0/> , Culture=neutral, PublicKeyToken=96d09a1eb7f44a77 nunit.util, Version=2.2.0.0 <http://2.2.0.0/> , Culture=neutral, PublicKeyToken=96d09a1eb7f44a77 ###################### Here's the source code example //LargestTest.cs using System; using NUnit.Framework; using NUnit.Framework.SyntaxHelpers; [TestFixture] public class LargestTest { [Test] public void LargestOf3() { Assert.That( Cmp.Largest( new int[] {8,9,7} ), Is.EqualTo(9) ); } } // Largest.cs using System; public class Cmp { public static int Largest( int[] list ) { int index, max = Int32.MaxValue; for( index = 0; index < list.Length - 1; index++ ) { if( list[index] > max ) { max = list[index]; } } return max; } } ------------------------------------------------------------------------- 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 <http://moblin-contest.org/redirect.php?banner_id=100&url=/> &url=/ _______________________________________________ Nunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nunit-users ------=_NextPart_000_003F_01C912C4.D97715C0 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"> <META content=3D"MSHTML 6.00.6000.16705" name=3DGENERATOR></HEAD> <BODY> <DIV><SPAN class=3D015193904-10092008><FONT face=3DArial color=3D#0000ff = size=3D2>Hi=20 Javier,</FONT></SPAN></DIV> <DIV><SPAN class=3D015193904-10092008><FONT face=3DArial color=3D#0000ff = size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D015193904-10092008><FONT face=3DArial color=3D#0000ff = size=3D2>I=20 think it would depend on how critical the machine on which you are = installing=20 is.</FONT></SPAN></DIV> <DIV><SPAN class=3D015193904-10092008><FONT face=3DArial color=3D#0000ff = size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D015193904-10092008><FONT face=3DArial color=3D#0000ff = size=3D2>For=20 safety, you could drop the entire tree into ~/nunit-2.5 and work from=20 there.</FONT></SPAN></DIV> <DIV><SPAN class=3D015193904-10092008><FONT face=3DArial color=3D#0000ff = size=3D2>You=20 would want to create aliases for the nunit executables for ease of=20 use.</FONT></SPAN></DIV> <DIV><SPAN class=3D015193904-10092008><FONT face=3DArial color=3D#0000ff = size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D015193904-10092008><FONT face=3DArial color=3D#0000ff = size=3D2>Charlie</FONT></SPAN></DIV><BR> <BLOCKQUOTE dir=3Dltr=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>=20 [email protected]=20 [mailto:[email protected]] <B>On Behalf Of = </B>javier=20 fernandez<BR><B>Sent:</B> Tuesday, September 09, 2008 9:30 = PM<BR><B>To:</B>=20 [email protected]<BR><B>Subject:</B> Re: [Nunit-users] = SyntaxHelpers does not exist in thenamespaceNUnit.Framework- nUnit=20 (2.2)<BR></FONT><BR></DIV> <DIV></DIV> <DIV dir=3Dltr> Thank you for clarifying that for me. I = followed=20 your instructions about downloading the <BR>binary distribution in to = a=20 separate folder which allowed me to referenced the dll during=20 compilation.<BR><BR>What I would like to do is replace the nUnit = version 2.2=20 installed by the package "mono-nunit-1.9.1-2.novell.i586.rpm" with the = binary=20 distribution I downloaded. <BR>But I'm not sure if its wise to move = all of the=20 files found in the binary folder of the <BR>downloaded distribution to = the=20 location where the current nunit version 2.2 related files are = <BR>kept after=20 I uninstall the package = "mono-nunit-1.9.1-2.novell.i586.rpm"<BR><BR>Please=20 recommend an installation approach that anticipates for future=20 upgrades.<BR><BR><BR><BR> <DIV class=3Dgmail_quote>On Mon, Sep 8, 2008 at 8:02 PM, Charlie Poole = <SPAN=20 dir=3Dltr><<A=20 = href=3D"mailto:[email protected]">[email protected]</= A>></SPAN>=20 wrote:<BR> <BLOCKQUOTE class=3Dgmail_quote=20 style=3D"PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: = rgb(204,204,204) 1px solid"> <DIV> <DIV><SPAN><FONT face=3DArial color=3D#0000ff size=3D2>The = constraint-based=20 assertion model and syntax was introduced in NUnit 2.4, so you=20 would</FONT></SPAN></DIV> <DIV><SPAN><FONT face=3DArial color=3D#0000ff size=3D2>have to be = using a later=20 version of NUnit for that to work. Since we don't provide the=20 RPMs,</FONT></SPAN></DIV> <DIV><SPAN><FONT face=3DArial color=3D#0000ff size=3D2>I can't help = you there.=20 However, it's feasible to take any of our binary distributions and=20 </FONT></SPAN></DIV> <DIV><SPAN><FONT face=3DArial color=3D#0000ff size=3D2>manually copy = the=20 assemblies to the correct location on your system, provided you=20 have</FONT></SPAN></DIV> <DIV><SPAN><FONT face=3DArial color=3D#0000ff size=3D2>root access. = Or if you=20 don't, just copy them into directories relative to your home=20 directory.</FONT></SPAN></DIV> <DIV><SPAN><FONT face=3DArial color=3D#0000ff = size=3D2></FONT></SPAN> </DIV> <DIV><SPAN><FONT face=3DArial color=3D#0000ff size=3D2>The NUnit = project will=20 eventually provide packages for an easier Linux install, but=20 we're</FONT></SPAN></DIV> <DIV><SPAN><FONT face=3DArial color=3D#0000ff size=3D2>not there=20 yet.</FONT></SPAN></DIV> <DIV><SPAN><FONT face=3DArial color=3D#0000ff = size=3D2></FONT></SPAN> </DIV> <DIV><SPAN><FONT face=3DArial color=3D#0000ff=20 size=3D2>Charlie</FONT></SPAN></DIV><BR> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: = rgb(0,0,255) 2px solid; MARGIN-RIGHT: 0px"> <DIV lang=3Den-us dir=3Dltr align=3Dleft> <HR> <FONT face=3DTahoma size=3D2><B>From:</B> <A=20 href=3D"mailto:[email protected]"=20 target=3D_blank>[email protected]</A> = [mailto:<A=20 href=3D"mailto:[email protected]"=20 target=3D_blank>[email protected]</A>] = <B>On Behalf=20 Of </B>javier fernandez<BR><B>Sent:</B> Monday, September 08, 2008 = 3:58=20 PM<BR><B>To:</B> <A = href=3D"mailto:[email protected]"=20 = target=3D_blank>[email protected]</A><BR><B>Subject:</B> = [Nunit-users] SyntaxHelpers does not exist in the=20 namespaceNUnit.Framework- nUnit (2.2)<BR></FONT><BR></DIV> <DIV> <DIV></DIV> <DIV class=3DWj3C7c> <DIV></DIV> <DIV dir=3Dltr>Hello,<BR><BR> Its my first time using = nUnit as=20 well as compiling C# with mono ( 1.9 ). I installed the=20 "mono-nunit-1.9.1-2.novell.i586.rpm", and copied an example from a = book to=20 a file for testing. But compiling the example using gmcs failed = with the=20 following error:<BR><PRE>[javier@localhost csharp]$ gmcs -debug = -t:library -r:System -r:nunit.framework.dll -r:nunit.util.dll = -out:Largest.dll Largest.cs LargestTest.cs <BR>LargestTest.cs(3,23): = error CS0234: The type or namespace name `SyntaxHelpers' does not exist = in the namespace `NUnit.Framework'. Are you missing an assembly = reference?<BR> </PRE>Also if I commented out the "using NUnit.Framework.SyntaxHelpers;" = it complains that "Assert.That()" doesn't exists in the namespace=20 NUnit.Framework<BR><BR>Please advice a solution.<BR><BR>Thanks in=20 advance.<BR><PRE><BR>####################<BR>Here's what's in my = GAC:<BR><BR>gacutil -l <BR><BR>nunit.core, Version=3D<A = href=3D"http://2.2.0.0/" target=3D_blank>2.2.0.0</A>, Culture=3Dneutral, = PublicKeyToken=3D96d09a1eb7f44a77<BR> nunit.framework, Version=3D<A href=3D"http://2.2.0.0/" = target=3D_blank>2.2.0.0</A>, Culture=3Dneutral, = PublicKeyToken=3D96d09a1eb7f44a77<BR> <BR>nunit.mocks, Version=3D<A href=3D"http://2.2.8.0/" = target=3D_blank>2.2.8.0</A>, Culture=3Dneutral, = PublicKeyToken=3D96d09a1eb7f44a77<BR>nunit.util, Version=3D<A = href=3D"http://2.2.0.0/" target=3D_blank>2.2.0.0</A>, Culture=3Dneutral, = PublicKeyToken=3D96d09a1eb7f44a77<BR> <BR><BR><BR>######################<BR>Here's the source code = example<BR><BR>//LargestTest.cs<BR><BR>using System;<BR>using = NUnit.Framework;<BR>using = NUnit.Framework.SyntaxHelpers;<BR><BR>[TestFixture]<BR>public class = LargestTest<BR> {<BR> [Test]<BR> public void LargestOf3()<BR> {<BR><BR> = Assert.That( Cmp.Largest( new int[] {8,9,7} ), Is.EqualTo(9) );<BR> = }<BR>}<BR><BR><BR>// Largest.cs<BR><BR>using System;<BR><BR>public class = Cmp<BR> {<BR> public static int Largest( int[] list )<BR> {<BR> int = index, max =3D Int32.MaxValue;<BR><BR><BR> for( index =3D 0; = index < list.Length - 1; index++ )<BR> {<BR> if( = list[index] > max )<BR> {<BR> max =3D list[index];<BR> = }<BR> }<BR><BR> return max;<BR><BR> = }<BR>}<BR></PRE><BR> =20 = <BR></DIV></DIV></DIV></BLOCKQUOTE></DIV><BR>----------------------------= ---------------------------------------------<BR>This=20 SF.Net email is sponsored by the Moblin Your Move Developer's=20 challenge<BR>Build the coolest Linux based applications with Moblin = SDK=20 & win great prizes<BR>Grand prize is a trip for two to an Open = Source=20 event anywhere in the world<BR><A=20 = href=3D"http://moblin-contest.org/redirect.php?banner_id=3D100&url=3D= /"=20 = target=3D_blank>http://moblin-contest.org/redirect.php?banner_id=3D100&am= p;url=3D/</A><BR>_______________________________________________<BR>Nunit= -users=20 mailing list<BR><A=20 = href=3D"mailto:[email protected]">[email protected]= eforge.net</A><BR><A=20 href=3D"https://lists.sourceforge.net/lists/listinfo/nunit-users"=20 = target=3D_blank>https://lists.sourceforge.net/lists/listinfo/nunit-users<= /A><BR><BR></BLOCKQUOTE></DIV><BR></DIV></BLOCKQUOTE></BODY></HTML> ------=_NextPart_000_003F_01C912C4.D97715C0-- --===============1182026173== 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=/ --===============1182026173== 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 --===============1182026173==--