Click here to Skip to main content
15,891,738 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Create Addons for Vb.net application or Plugins that not install full application if user required click on addons and add to application
Posted

1 solution

This is a pretty big and complex topic, but it does not have to be a big work. Please see my past answers on the topic and ask me further questions if something is not clear:

Create WPF Application that uses Reloadable Plugins...[^],
AppDomain refuses to load an assembly[^],
code generating using CodeDom[^],
Create WPF Application that uses Reloadable Plugins...[^],
Dynamically Load User Controls[^],
C# Reflection InvokeMember on existing instance[^],
Projects and DLL's: How to keep them managable?[^],
Gathering types from assemblies by it's string representation[^].

First of all, look at the last answer, as it describes the simplest aspect of it, and, chances are, this is all you need.

See also: adding reference programmatically[^].

Now, a short summary: plug-in architecture is pretty easy to implement if you need loadable plug-ins, but not reloadable. This is because unloading of assemblies is not allowed in .NET. If you re-load but not unload, it will cause a strong memory leak. The only way to unload is to use separate Application Domains, which have isolated address spaces and can be unloaded. But the feature which allow unloads becomes work much harder, because IPC is required. But this is not extremely hard, because Application Domains provides simplified IPC.

Everything else depends on the featured specific to your application requirements.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900