scarpacci
scarpacci

Reputation: 9194

.Net equivalent to deployable EAR

In one of our Java EE environments we are able to encapsulate modules inside of java ear files and deploy them to our JBoss environment so that they will be picked up and made available to users. In the .Net world how would one go about implementing a similar functionality in the run-time environment? Is this where MEF comes in? Or would it be approached in a completely different way?

Any suggestions would be greatly appreciated.

Thanks,

S

Upvotes: 1

Views: 604

Answers (1)

p.s.w.g
p.s.w.g

Reputation: 149020

You can just compile them to a separate assembly. These module assemblies can be distributed separately from your main application.

When you're composing your objects in MEF, you can specify a DirectoryCatalog (or ApplicationCatalog) to include all modules from all assemblies in a given directory:

var catalog =  new DirectoryCatalog(".\modules");
var container =  new CompositionContainer(catalog);

Upvotes: 1

Related Questions