Groups | Blog | Home
all groups > dotnet faqs > january 2004 >

dotnet faqs : Loading Assemblies at runtime (...from the GAC)


Timothy
1/24/2004 9:54:21 AM

Hi,

The following code loaded an assembly from a file

objPlugin = CType(Activator.CreateInstanceFrom(AppPath() & "Plugins\" &
mnuItem.AssemblyName, mnuItem.ClassName).Unwrap, iGameModule)


But what if that assembly is in the GAC ?

So I could have an XML file for each plugin, and then specify the
filename and for those that are in the GAC just specify "GAC" or something.

But how do I load them then ?

Gaurav Khanna [C# MVP]
1/27/2004 12:15:52 PM
Hi!

Use Assembly.LoadFrom. Specify the evidence details to load the same.

--
Regards,
Kumar Gaurav Khanna
-----------------------------------------------------------------
Microsoft MVP - C#/.NET, MCSE Windows 2000/NT4, MCP+I
WinToolZone - Spelunking Microsoft Technologies
http://www.wintoolzone.com/
OpSupport - Spelunking Rotor
http://opsupport.sscli.net/
Bangalore .NET Users' Group
http://groups.msn.com/bdotnet/
[quoted text, click to view]

AddThis Social Bookmark Button