Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Limitations of hint directories

Discussion topic

Back to topic list

Limitations of hint directories


Author j9brown
Full name Jeff Brown
Date 2005-05-08 16:43:18 PDT
Message Looking for some guidance on a thorny problem.

Hypothetical scenario:
- Assembly.To.Test.dll located in C:\Foo
- MbUnit.Framework.dll located in C:\MbUnit

MbUnit fails to construct the RemoteTestEngine if its assemblies are not
co-located with the assembly to be tested. The failure occurs in
SeparateTestDomain.C​reateTestEngine on CreateInstanceAndUnwrap because
the assembly that contains RemoteTestEngine cannot be loaded in the
remote app domain.

Hint directories don't help here because the AssemblyResolverManager
instance has not yet been created within the remote app domain. Bit of
a chicken and egg problem...

Currently I'm working around this problem by copying the MbUnit dlls
into the application's base directory.

However, it turns out that it is insufficient to just copy the MbUnit
dlls. Hint directories only get added AFTER the TestEngine has been
populated. This is too late. During population, some other dependent
assemblies failed to be resolved. To work around this, I have to copy
all of _those_ dlls too -- or modify MbUnit to add the hint directories
to the test engine resolver sooner.

I think to make this "just work," the hint directories need to be set up
as early as possible. Perhaps they could be set as private bin paths in
the AppDomainSetup. Would this work? Alternately, maybe we could
inject a resolver into the newly created domain right after creation.
What would be the side-effects?

Any thoughts?


« Previous message in topic | 1 of 1 | Next message in topic »


Show all messages in topic

Limitations of hint directories j9brown Jeff Brown 2005-05-08 16:43:18 PDT
Messages per page: