Yes, I can run the Nunit gui correctly. I've run the unit tests against my
projects without any problems.

As a sanity check, I also built a debug build of Nant and run the unit tests
using build nunit-gui.exe and nunit-console.exe on:
        Nant.dotnettasks.tests.dll
        Nant.core.tests.dll

No problems there either.

[Testing Nant at the commandline with 'nant test' succeeds in running it's
own nunit2 task without any problems.]

I installed Nunit to:
        c:\bin\Nunit\...

Specifically, all the Nunit binaries live at:
        c:\bin\Nunit\bin

Yes, I've tried setting the assembly reference the assembly in the nant\bin
directory. Here's an excerpt from one one of my build scripts:

        <target name="build" description="Build the Reveal project">
                <csc target="exe" output="${TargetExe}" debug="${debug}">
                        <arg value="/fullpaths" />
                        <sources>
                                <includes name="Reveal.cs" />
                                <includes name="TestNamespace.cs" />
                                <includes name="TestReveal.cs" />
                        </sources>
                        <references>
                                <includes
name="${nant.location}nunit.framework.dll" />
                        </references>
                </csc>
        </target>

Reading a little bit more on MSDN, mismatched DLLs are suppose to give
TypeLoadExceptions. The exception I'm getting is a FileLoadException.

I'll probably try turning on Fusion logging to see if I can track this down
on my end while waiting for a reply.

- Ants



| -----Original Message-----
| From: Philip Nelson [mailto:[EMAIL PROTECTED] 
| Sent: Friday, 28 March, 2003 12:31
| To: Anthony Francisco; 'Matthew Mastracci'
| Cc: [EMAIL PROTECTED]; 
| [EMAIL PROTECTED]
| Subject: RE: [nant-dev] [Nant-users] How to use nunit2 task (resend)
| 
| 
| Can you run the NUnit gui correctly?  Is it installed under 
| "Program Files" or somewhere else?  Have you tried setting 
| the assembly reference in your test project to the assembly 
| in the NAnt/bin directory?
| 
| It almost has to be mismatched dlls.
| 
| 
| --- Anthony Francisco <[EMAIL PROTECTED]> wrote:
| > Actually that was the first thing that I checked.
| > 
| > The only file with the same filename that I could find between my 
| > nant\bin and nunit\bin directories was nunit.framework.dll. Doing a 
| > binary file compare between the two files indicated a perfect match.
| > 
| > - Ants
| > 
| > | -----Original Message-----
| > | From: Matthew Mastracci [mailto:[EMAIL PROTECTED]
| > | Sent: Friday, 28 March, 2003 07:59
| > | To: Anthony Francisco
| > | Cc: [EMAIL PROTECTED]; 
| > | [EMAIL PROTECTED]
| > | Subject: Re: [nant-dev] [Nant-users] How to use nunit2 
| task (resend)
| > | 
| > | 
| > | Make sure that you're using the same version of NUnit for
| > | linking your 
| > | test assemblies that NAnt uses.  You'll get this error if 
| there is a 
| > | mismatch.  I'm not sure what we can do to fix the issue 
| of linking 
| > | against the wrong NUnit, but I'm guessing that this is what 
| > | the problem is.
| > | 
| > | Anthony Francisco wrote:
| > | 
| > | > I getting a crash in NAnt when trying to use the nunit2 task.
| > | >  
| > | > I tried using the nunit2 task using the following in my
| > | build script:
| > | >  
| > | >  <target name="test" depends="build" description="Runs 
| NUnit tests">
| > | >   <nunit2>
| > | >    <test assemblyname="Reveal.exe" />
| > | >   </nunit2>
| > | >  </target>
| > | > The result I get is:
| > | > INTERNAL ERROR
| > | > System.IO.FileLoadException: Unable to load file 
| > | > 'nunit.framework'.
| > | > File name: "nunit.framework"
| > | >  
| > | > Server stack trace:
| > | >    at System.Reflection.Assembly.nLoad(AssemblyName fileName, 
| > | > String codeBase, B oolean isStringized, Evidence 
| assemblySecurity, 
| > | > Boolean throwOnFileNotFound, Ass
| > | > embly locationHint, StackCrawlMark& stackMark)
| > | >    at System.Reflection.Assembly.InternalLoad(AssemblyName 
| > | > assemblyRef, Boolean
| > | > stringized, Evidence assemblySecurity, StackCrawlMark& 
| stackMark)
| > | >    at System.Reflection.Assembly.InternalLoad(String 
| > | assemblyString,
| > | > Evidence as
| > | > semblySecurity, StackCrawlMark& stackMark)
| > | >    at System.Activator.CreateInstance(String 
| assemblyName, String
| > | > typeName, Bool
| > | > ean ignoreCase, BindingFlags bindingAttr, Binder 
| binder, Object[] 
| > | > args, CultureI
| > | > nfo culture, Object[] activationAttributes, Evidence 
| securityInfo, 
| > | > StackCrawlMar
| > | > k& stackMark)
| > | >    at System.Activator.CreateInstance(String 
| assemblyName, String 
| > | > typeName, Bool
| > | > ean ignoreCase, BindingFlags bindingAttr, Binder 
| binder, Object[] 
| > | > args, CultureI
| > | > nfo culture, Object[] activationAttributes, Evidence 
| securityInfo)
| > | >    at System.AppDomain.CreateInstance(String 
| assemblyName, String 
| > | > typeName, Bool
| > | > ean ignoreCase, BindingFlags bindingAttr, Binder 
| binder, Object[] 
| > | > args, CultureI
| > | > nfo culture, Object[] activationAttributes, Evidence 
| > | securityAttributes)
| > | >    at
| > | > 
| > | System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProc
| > | essMessage(M
| > | > ethodBase mb, Object[] args, Object server, Int32
| > | methodPtr, Boolean
| > | > fExecuteInC
| > | > ontext, Object[]& outArgs)
| > | >    at
| > | > 
| > | System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcess
| > | Message(IMes
| > | > sage msg, Int32 methodPtr, Boolean fExecuteInContext)
| > | >  
| > | > Exception rethrown at [0]:
| > | >    at
| > | > 
| > | System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(
| > | IMessage req
| > | > Msg, IMessage retMsg)
| > | >    at
| > | > 
| > | System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(Messag
| > | eData& msgDa
| > | > ta, Int32 type)
| > | >    at System.AppDomain.CreateInstance(String 
| assemblyName, String
| > | > typeName, Bool
| > | > ean ignoreCase, BindingFlags bindingAttr, Binder 
| binder, Object[] 
| > | > args, CultureI
| > | > nfo culture, Object[] activationAttributes, Evidence 
| > | securityAttributes)
| > | >    at
| > | > 
| > | SourceForge.NAnt.Tasks.NUnit2.NUnit2TestDomain.CreateTestRunne
| > | r(AppDomain
| > | > domain)
| > | >    at SourceForge.NAnt.Tasks.NUnit2.NUnit2TestDomain.Run(String
| > | > assemblyFile, St
| > | > ring configFilePath, EventListener listener)
| > | >    at 
| > | > 
| > | SourceForge.NAnt.Tasks.NUnit2.NUnit2Task.RunRemoteTest(NUnit2T
| > | est test, Ev
| > | > entListener listener)
| > | >    at SourceForge.NAnt.Tasks.NUnit2.NUnit2Task.ExecuteTask()
| > | >    at SourceForge.NAnt.Task.Execute()
| > | >    at SourceForge.NAnt.Target.Execute()
| > | >    at SourceForge.NAnt.Project.Execute(String targetName)
| > | >    at SourceForge.NAnt.Project.Execute()
| > | >    at SourceForge.NAnt.Project.Run()
| > | >  
| > | > Fusion log follows:
| > | >  
| > | > Please send bug report to [EMAIL PROTECTED]
| > | > <mailto:[EMAIL PROTECTED]>
| > | > Try 'nant -help' for more information
| > | > I can run nunit-console just fine from the 
| command-line, but NAnt
| > | > seems unable to be crashing.
| > | >  
| > | > Is there anything special I need to do to my NT CMD shell ?
| > | >  
| > | > - Ants
| > | 
| > | 
| > 
| > 
| > 
| > -------------------------------------------------------
| > This SF.net email is sponsored by:
| > The Definitive IT and Networking Event. Be There!
| > NetWorld+Interop Las Vegas 2003 -- Register today!
| > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
| > _______________________________________________
| > Nant-developers mailing list [EMAIL PROTECTED]
| > https://lists.sourceforge.net/lists/listinfo/nant-developers
| 



-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to