Home All Groups Group Topic Archive Search About

Dynamic Loading of Private Assemblies?

Author
9 Dec 2005 4:44 PM
Spam Catcher
Does anyone have an example on how to dynamically load private assemblies
in ASP.NET - like what DotNetNuke does?

Do private assemblies have to be in the BIN directory... or can they be
located anywhere in the file system?

Thanks.

--
Stan Kee (spamhoneypot@rogers.com)

Author
9 Dec 2005 8:36 PM
Paul Gielens
Hi Stan,

> Does anyone have an example on how to dynamically load private assemblies
> in ASP.NET - like what DotNetNuke does?

AppDomain domain = AppDomain.CreateDomain("loader");
Bar bar = (Bar) domain.CreateInstanceFromAndUnwrap("Foo.dll", "Foo.Bar");
AppDomain.Unload(domain);

> Do private assemblies have to be in the BIN directory... or can they be
> located anywhere in the file system?

A private assembly is a assembly that is available to particular
applications where they are kept. And cannot be references outside the scope
of the folder where they are kept.


Best regards,
Paul Gielens

Visit my blog @ http://weblogs.asp.net/pgielens/
###

AddThis Social Bookmark Button