Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / January 2006

Tip: Looking for answers? Try searching our database.

AppDomain and PrivateBinPath

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Franz Gsell - 30 Jan 2006 16:04 GMT
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
Franz Gsell - 31 Jan 2006 17:53 GMT
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

> Hi together,
>
[quoted text clipped - 52 lines]
> Cheers,
> Franz

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.