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 2005

Tip: Looking for answers? Try searching our database.

Dynamic Assembly

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
BrianS - 06 Jan 2005 22:37 GMT
Hello,

I have Assembly (A) which dynamically loads Asembly (B). Both Assemblies are
located in A's bin dir.

If I query, AppDomain.CurrentDomain.GetAssemblies

Returns an unloaded/unreferenced assembly (B) why? Assembly A does not
refernce any types in B. Is there a way to prevent this assembly from loading
on startup?
Cowboy (Gregory A. Beamer) - MVP - 07 Jan 2005 13:59 GMT
As long as the assembly is in the app path, it will be queried by your app,
even if it is never used. If you want to get around this, hide the assembly
and use Reflection to dynamically load it. If you want to go to the nth with
dynamic loading, you can store the assembly as code and gen it at runtime
with Reflection.Emit. The source will not show up as an unloaded assembly,
even if you smack it in the /bin folder.

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

> Hello,
>
[quoted text clipped - 6 lines]
> refernce any types in B. Is there a way to prevent this assembly from loading
> on startup?
BrianS - 07 Jan 2005 14:55 GMT
What is the correct way to "hide" the assembly. I set the file attribute to
hidden, but It still is loading the assembly.

> As long as the assembly is in the app path, it will be queried by your app,
> even if it is never used. If you want to get around this, hide the assembly
[quoted text clipped - 22 lines]
> > refernce any types in B. Is there a way to prevent this assembly from loading
> > on startup?

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.