AppDomain.CreateDomain to NOT use GAC ...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Joe Duchtel

    AppDomain.CreateDomain to NOT use GAC ...

    Hello -

    I am using the AppDomain.Creat eDomain() 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.Creat eDomain("C:\Tes t\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
  • Joe Duchtel

    #2
    Re: AppDomain.Creat eDomain to NOT use GAC ...

    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



    On Nov 19, 2:14 pm, Joe Duchtel <duch...@gmail. comwrote:
    Hello -
    >
    I am using the AppDomain.Creat eDomain() 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.Creat eDomain("C:\Tes t\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

    Comment

    Working...