Click here to Skip to main content
13,196,126 members (47,564 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Create Addons for application or Plugins that not install full application if user required click on addons and add to application
Posted 30-Jan-13 19:30pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.


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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.171019.1 | Last Updated 31 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100