MbUnit v3 provides a guarantee that the test is executing with the current 
working directory of the assembly's folder (unless overridden).

In v2 I find the following useful:

Path.GetDirectoryName(new Uri(typeof(MyFixture).Assembly.Codebase).LocalPath)

That handles the case where the assembly might be shadow-copied (so its 
Location property would be in the shadow-copy folder).
-----Original Message-----
From: lpinho <[EMAIL PROTECTED]>
Date: Monday, Nov 24, 2008 9:51 am
Subject: MbUnit how can I get the path of the test assembly?
To: "MbUnit.User" <[email protected]>Reply-To: 
[email protected]


Hi there,

 I'm using the MB Unit GUI, and I load an assembly full of tests, one of the 
tests must load a file that exists within the output directory of the test 
project, and the GUI exists on a completely different
directory.

 Is there any way to know the path of the assembly being tested? (the 
GetExecutingAssembly() method will return the path of the GUI, not of the 
assembly being tested)

Thanks ahead for all the help,

Luis Pinho




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MbUnit.User" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/MbUnitUser?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to