AppDomain.CreateDomain to NOT use GAC ...

J

Joe Duchtel

Hello -

I am using the AppDomain.CreateDomain() function to load an assembly
from a local *.dll where the *.dll is also in the GAC. This worked
fine for .NET 1.1 where it would load the local file but with .NET 2.0
(Visual Studio 2008) it always loads the version in the GAC instead.

I changed the CreateDomain() as follows to tell it that I want to use
the X.dll from C:\Test and NOT the GAC ...

mAppDomain = AppDomain.CreateDomain("C:\Test\X.dll", Nothing, "C:
\Test", Nothing, False)

.... but it keeps loading the version from the GAC. I also looked into
using the AppDomainSetup but I'm not sure which settings to specify in
there. I'd like to keep it simple ... just ignore the GAC ...

I am launching the application that calls CreateDomain() via the
Debugger (Start external program) when I debug X.dll. Is there a lock
on the local X.dll because of that? This used to work fine in Visual
Studio 2003 ...

Thanks,
Joe
 
J

Joe Duchtel

Hello -

Okay ... I did some more digging and it looks like there is no way to
tell the AppDomain not to look in the GAC first. The one workaround
is to just change the AssemblyVersion of the *.dll so it cannot be
found in the GAC anymore.

Thanks,
Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

GAC install problem 2
Regasm: How to use? 3
cant make an upgrade 1
GAC assembly versioning QFE behavior 1
Version conflicts between local and GAC 8
GAC question 2
GAC Utility 0
Deployment problem 5

Top