I have some code
var aa = a();
b(aa);
While debugging, I set a breakpoint on the b()
call. Then going to the immediate window, I'd like to be able to execute code from a DLL that is in my project but is not yet loaded. Say I want a new Boo
and call Foo()
. The code is in the namespace Baz
in dll Spongle.dll
.
When I type
>> new Baz.Boo().Foo(aa)
I get the error: The type or namespace name 'Baz' is not valid in this scope.
If I change my code such that my Boo
is already loaded it works fine.
new Boo(); // dummy to ensure loading
var aa = a();
b(aa);
Is it possible to load the dll from the immediate window during debug so I can call my code despite it being loaded (yet)?. I could use the new Boo()
as a static initializer of my application main class, but then I have problems during unit testing as it won't necesarily involve the class with that static initializer.
Baz
and is already included in my question unfortunately. – Elnaelnar