How to create and copy a class library for output without reference to it in Visual Studio?

I am working on an extensible plug-in web application. Each plugin is in a separate class library project and implements some predefined IPluginInterface from the shared library. An application should load them at startup using MEF. I need to automatically build all the plug-in projects in my solution and copy them to the bin folder of my host project each time the solution is restored. The host application does not need to know anything about specific plugin implementations, so I do not want to add a link to these class libraries from it.

I know this can be done using some command line script, but maybe there is an easier way to do this?

Thanks.

+4
source share
1 answer

I do not know any built-in methods. Currently, I am using the following on the command line post build (the application being my host application):

 XCOPY "$(ProjectDir)$(OutDir)*" "$(SolutionDir)Application\bin\Debug\*" /y XCOPY "$(ProjectDir)$(OutDir)*" "$(SolutionDir)Application\bin\Release\*" /y 
+2
source

Source: https://habr.com/ru/post/1337785/


All Articles