Layl Conway
Layl Conway

Reputation: 405

How to organize references for plugin DLLs in .NET

I'm working on an application that loads in plugins through Assembly.Load. I want to make sure plugins DLLs don't contain more compiled code then they need. Currently I've got 2 projects:

MyPlugin has a class implementing IPlugin from the Application project, and references the project to do so. Is this the correct way to do it or should I put IPlugin (along with interfaces for anything plugins need access to) in a separate project, or is there some other better way to do it?

Upvotes: 1

Views: 705

Answers (1)

Helikaon
Helikaon

Reputation: 1508

I would definitely create a new project containing only the contracts (interfaces) which could be referenced by the plugin projects. Besides, take a look at MEF

this is a great way to create a plugin architecture in .NET. And it also is a part of .NET.

Upvotes: 1

Related Questions