Re: SyntaxHelpers does not exist in the namespaceNUnit.Framework- nUnit (2.2)
"javier fernandez" <[email protected]> Wed, 10 Sep 2008 00:29:33 -0400
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <[email protected]> |
--===============0503311921== Content-Type: multipart/alternative; boundary="----=_Part_7145_21793346.1221020973426" ------=_Part_7145_21793346.1221020973426 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77 > nunit.framework, Version=2.2.0.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77 > > nunit.mocks, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77 > nunit.util, Version=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&url=/ > _______________________________________________ > Nunit-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/nunit-users > > ------=_Part_7145_21793346.1221020973426 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline <div dir="ltr"> Thank you for clarifying that for me. I followed your instructions about downloading the <br>binary distribution in to a separate folder which allowed me to referenced the dll during compilation.<br><br> 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. <br>But I'm not sure if its wise to move all of the files found in the binary folder of the <br> downloaded distribution to the location where the current nunit version 2.2 related files are <br>kept after I uninstall the package "mono-nunit-1.9.1-2.novell.i586.rpm"<br><br>Please recommend an installation approach that anticipates for future upgrades.<br> <br><br><br><div class="gmail_quote">On Mon, Sep 8, 2008 at 8:02 PM, Charlie Poole <span dir="ltr"><<a href="mailto:[email protected]">[email protected]</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div> <div><span><font color="#0000ff" face="Arial" size="2">The constraint-based assertion model and syntax was introduced in NUnit 2.4, so you would</font></span></div> <div><span><font color="#0000ff" face="Arial" size="2">have to be using a later version of NUnit for that to work. Since we don't provide the RPMs,</font></span></div> <div><span><font color="#0000ff" face="Arial" size="2">I can't help you there. However, it's feasible to take any of our binary distributions and </font></span></div> <div><span><font color="#0000ff" face="Arial" size="2">manually copy the assemblies to the correct location on your system, provided you have</font></span></div> <div><span><font color="#0000ff" face="Arial" size="2">root access. Or if you don't, just copy them into directories relative to your home directory.</font></span></div> <div><span><font color="#0000ff" face="Arial" size="2"></font></span> </div> <div><span><font color="#0000ff" face="Arial" size="2">The NUnit project will eventually provide packages for an easier Linux install, but we're</font></span></div> <div><span><font color="#0000ff" face="Arial" size="2">not there yet.</font></span></div> <div><span><font color="#0000ff" face="Arial" size="2"></font></span> </div> <div><span><font color="#0000ff" face="Arial" size="2">Charlie</font></span></div><br> <blockquote dir="ltr" style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;"> <div dir="ltr" align="left" lang="en-us"> <hr> <font face="Tahoma" size="2"><b>From:</b> <a href="mailto:[email protected]" target="_blank">[email protected]</a> [mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>] <b>On Behalf Of </b>javier fernandez<br><b>Sent:</b> Monday, September 08, 2008 3:58 PM<br><b>To:</b> <a href="mailto:[email protected]" target="_blank">[email protected]</a><br><b>Subject:</b> [Nunit-users] SyntaxHelpers does not exist in the namespaceNUnit.Framework- nUnit (2.2)<br></font><br></div><div><div></div><div class="Wj3C7c"> <div></div> <div dir="ltr">Hello,<br><br> 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:<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 NUnit.Framework<br><br>Please advice a solution.<br><br>Thanks in advance.<br><pre><br>####################<br>Here's what's in my GAC:<br><br>gacutil -l <br><br>nunit.core, Version=<a href="http://2.2.0.0/" target="_blank">2.2.0.0</a>, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77<br> nunit.framework, Version=<a href="http://2.2.0.0/" target="_blank">2.2.0.0</a>, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77<br> <br>nunit.mocks, Version=<a href="http://2.2.8.0/" target="_blank">2.2.8.0</a>, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77<br>nunit.util, Version=<a href="http://2.2.0.0/" target="_blank">2.2.0.0</a>, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77<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 = Int32.MaxValue;<br><br><br> for( index = 0; index < list.Length - 1; index++ )<br> {<br> if( list[index] > max )<br> {<br> max = list[index];<br> }<br> }<br><br> return max;<br><br> }<br>}<br></pre><br> <br></div></div></div></blockquote></div> <br>-------------------------------------------------------------------------<br> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge<br> Build the coolest Linux based applications with Moblin SDK & win great prizes<br> Grand prize is a trip for two to an Open Source event anywhere in the world<br> <a href="http://moblin-contest.org/redirect.php?banner_id=100&url=/" target="_blank">http://moblin-contest.org/redirect.php?banner_id=100&url=/</a><br>_______________________________________________<br> Nunit-users mailing list<br> <a href="mailto:[email protected]">[email protected]</a><br> <a href="https://lists.sourceforge.net/lists/listinfo/nunit-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nunit-users</a><br> <br></blockquote></div><br></div> ------=_Part_7145_21793346.1221020973426-- --===============0503311921== 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=/ --===============0503311921== 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 --===============0503311921==--