UnitTestRunner.exe directories
Why does UnitTestRunner make copies of all the assemblies into a complex
temp directory structure underneath /Documents and Settings/username and
run from there instead of just running from the actual project output
folder? I'm trying to do some runtime reflection to get at some files
near my source code files, and it would work except for this weird move
by UnitTestRunner.
I'm trying code like:
string directory =
Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly((myInstance).GetType()).Location);
and it's thrown off bigtime because of the assemblies being moved.
Argh this is frustrating.
Please sign in to leave a comment.
That is default "shadow copy" directory
--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Chris Morris" <chris.morris@einstruction.com> wrote in message
news:ekfr07$kld$1@is.intellij.net...
>
>
>
>
Eugene Pasynkov (JetBrains) wrote:
Why is it done that way? Is there an option to not do this? Are there
side effects I'm unaware of with just running with the assemblies in the
default build output folders?
Hello Chris,
one sich side effect is that the output assemblies will be locked and couldn't
be overwritten during test run which is not always something that you want.
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
>> That is default "shadow copy" directory
>>
Don't the Team System test runner, the TestDriven.NET test runner, and the
NUnit test runner work with shadow copies too? This issue of file contention
is not unique to UnitRunner. One just has to ensure the other files are copied
to the same directory.
Dmitry Shaporenkov wrote:
Apparently (unless I missed this option with 2.0) you guys decided to
put in an option for this ... there's now (2.5) a checkbox in the Unit
Testing options to turn off the shadow copy. Cool.
I didn't see this listed here:
http://www.jetbrains.com/resharper/features/newfeatures.html?rs25nl --
but maybe that was too small to mention.
Anyway - nice to stumble across this, would've been nice to know it was
added ahead of time in case I didn't stumble across it for sometime.