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
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