AppDomain and PrivateBinPath

F

Franz Gsell

Hi together,

I have got a question according to AppDomains and their PrivateBinPath
property.
I am doing the following:

------> SNIP

AppDomainSetup actSetup = new AppDomainSetup();
actSetup.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory;
actSetup.PrivateBinPath = @"Lib2;Lib1";
AppDomain firstLibDomain =
AppDomain.CreateDomain(Guid.NewGuid().ToString(),
null, actSetup);
IClassLibrary actLib = firstLibDomain.CreateInstanceAndUnwrap("MyLib,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=397a36feab9afc6a",
"ClassLibrary.Test") as IClassLibrary;

--------< SNAP

So everthing is fine. As you can see there are two subdirectories: Lib2
and
Lib1 in the private bin path. Now when I have an assembly with the
fully
qualified name like:

"MyLib, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=63f75bd8dc418e77",
"ClassLibrary.Test"

(the only difference is the public key token) in the Lib2 subdirectory
and

"MyLib, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=397a36feab9afc6a",
"ClassLibrary.Test"

in the Lib1 subdirectory. I get the following error in the fusion log.

WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY
TOKEN
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing
terminated.

Which means that he finds the assembly name, but the public key token
doesn't match. So the loading mechnism stops here instead of looking
in the other subfolder Lib2 where the matching assembly would be.

If I put both assemblies in the GAC I didn't have any problems. So I am

wondering, I thought that I could get this running with AppDomain too?

Any ideas what's wrong here????

Cheers,
Franz
 
F

Franz Gsell

Hmmm,

is there nobody from microsoft who can give me a hint here? I thing the
whole AppDomain thing is not very good documented, so any hints would be
great??

Cheers,
Franz
 

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

Top