I had read all of the many posts here on Stackoverflow on how to use MVC with MEF and have links for those, what I had not found an answer to in all of the questions and searching the internet is how to create plugins with MEF that can be Turn on,off, install, and uninstall from an Admin setting page.
I am trying to create my own CMS for MVC and would like to use MEF as part of my plugin framework.
Just need to know how to programmatically install, uninstall, turn on, and turn off the plugins that are made for MEF.
Thinking of writing "Plugins" to use MEF and then package that into Nuget where it can be installed and uninstalled from the Admin setting page.
Nuget would be responsible for Installing and Uninstalling
MEF would be responsible for registering the plugin, and some how have options to turn it on and off.
Example Situation:
User install CMS
User goes to Admin Section --> Plugins
User sees a list of Plugins that they can install and use for the CMS
User click "Install" and the MEF plugin is installed into the CMS
User Click "Turn on" and the MEF plugin is ready to be used by the system
User wants to temporary turn off the plugin, user clicks "Turn Off"
User no longer needs the plugin and clicks "Uninstall" and the plug-in is deleted completely from the CMS system.
User realizes that they accidentally deleted the wrong plugin, user clicks again "Install".
Goal is to be able to control plugins from an Admin settings type of page being able to install, uninstall, turn on, and turn off would be a great feature to have in a CMS.
I know other CMS uses this type of functions for their plug-ins but don't know of any that Uses MEF as part of their framework to do this.
Most uses their own internal Plugin framework for these functions.
I am hoping to be able to use the MEF framework to help do this.
An other goal is to basically have a system where "Plugins" targeting MEF and packaged in Nuget can basically be hosted some where like Nuget.org.
In the Nuget Package, with MEF everything that the "Plugin" needs is contained within the Nuget Package.
But, because it is using MEF, this package can technically only contain 1 DLL and when a user install the Nuget Package MEF will register the dll with their website.
Example could be a Blog, in the package it contains everything that is needed.
User goes to Visual Studio Install Nuget Package "Blog" and it install 1 dll that contains everything that it needs.
MEF will register the package with the user website and that is it.
No configurations or anything on the user side.
Just Pull and install from Nuget and that is it :)