Saturday, 2 February 2013

Copy MEF Plugins to directory

MEF and Plugins directory

I have created a project in which I wanted to use plugins directory.
Now every plugin has multiple dlls that are required,

Step one I want to copy every dll into plugins directory using post build command.


xcopy "$(TargetDir)*.dll" "$(SolutionDir)ConsoleApplication2\bin\debug\plugins\" /Y /I

Common switches used for

/I - treat as a directory if copying multiple files
/Q - Do not display the files being copied.
/S - Copy subdirectories unless empty.
/E - Copy empty subdirectories.
/Y - Do not prompt for overwrite of existing files.
/R - Overwrite read only files.
 
more information you can find when you type: help xcopy into your command line