Re: Using NUnit with Visual C# 2008 Express

"Charlie Poole" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <001a01c88dcd$956d4ec0$6401a8c0@ferrari>
Thanks for letting us know. Note that you can also run the Gui
using the same approach. Just reference nunit-gui-runner and
call AppEntry.Main().

Charlie

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf 
> Of Thomas Barnekow
> Sent: Monday, March 24, 2008 2:46 AM
> To: nunit-users
> Subject: Re: [Nunit-users] Using NUnit with Visual C# 2008 Express
> 
> Hi again,
> 
> I've solved the problem. I think it was due to my specific setup.
> 
> I'm running Visual C# 2008 Express in a VMWare Virtual 
> Machine on Mac OS X. The project files were located on a 
> virtual shared drive (Z:) and not on the virtual main drive 
> (C:). Accessing (e.g., reading) files from this shared drive 
> produced the security exception. When I moved the main Visual 
> Studio 2008 folder containing projects and stuff from Z: to 
> C:, everything worked fine.
> 
> Once you are good to go, the solution to the Visual C# 2008 
> Express debugging limitations is also easy. You just create 
> your own Test Runner Console Application referencing 
> nunit-console-runner. The startup object's Main method 
> basically just calls Runner.Main() as shown below.
> 
>          static void Main(string[] args)
>          {
>              // Run tests
>              Runner.Main(args);
> 
>              // Done
>              Console.WriteLine("Hit any key to continue");
>              Console.ReadKey();
>          }
> 
> Arguments can be provided on the Debug properties page.
> 
> I have two other projects in my solution: one NUnit test 
> assembly containing the actual tests and the assembly to be 
> tested. I also referenced these two projects in my Test 
> Runner application to have all the output in one folder.
> 
> Cheers, Thomas
> 
> On 23.03.2008, at 18:55, Thomas Barnekow wrote:
> 
> > Hi,
> >
> > I'm trying to use NUnit with Visual C# 2008 Express which, 
> > unfortunately, has some debugging limitations. 
> Specifically, it does 
> > not allow me to connect to a running process (e.g., 
> nunit-console.exe) 
> > so that I can not easily debug my code when it's called by 
> NUnit test 
> > classes.
> >
> > To deal with this, I've created a separate Console 
> Application with a 
> > wrapper class that just calls Runner.Main(). The project references 
> > nunit-console-runner and other necessary assemblies. This 
> doesn't work 
> > as expected, however, since I'm getting security exceptions 
> (missing 
> > FileIOPermission). My calling class is fully trusted (at least I 
> > believe it is).
> >
> > I must admit that I've never really worked with the .NET security 
> > framework, so I might be missing out on something pretty 
> basic. On the 
> > other hand, I thought I might ask the list about the best practices 
> > when using NUnit with the Express versions of Visual C#.
> >
> > Any feedback and help is highly appreciated.
> >
> > Cheers, Thomas Barnekow
> >
> > 
> ----------------------------------------------------------------------
> > --- This SF.net email is sponsored by: Microsoft Defy all 
> challenges. 
> > Microsoft(R) Visual Studio 2008.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > _______________________________________________
> > Nunit-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/nunit-users
> 
> 
> --------------------------------------------------------------
> -----------
> This SF.net email is sponsored by: Microsoft Defy all 
> challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Nunit-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/nunit-users
> 



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.