I have a C# application which can be extended by plugins. The application consists of entry application, multiple general plugins and usually one customer specific plugin. All the plugins go to a plugins folder of the main application into their respective folders. The plugins are dlls, but they can also have other dependencies / satellite assemblies / resources / ... in their folders.
For every customer, I have a solution in Visual Studio (2019). The solution contains the main app (project), used general plugins (for each one project) and the specific plugin for that customer (project).
Is it possible to write a build script in Visual Studio, which will build the entire solution, move the plugins into their respective folders (MainApp/plugins/pluginA/...) of the main application? And because each plugin has dependency on the main app (and possible other plugins), it will move only unique files of that plugin? Because otherwise it would lead to many duplicates, like the main application placed in the plugin folder.
What is the best way? Is there a solution-wide deploy script? Do I need to specify all the files manually? Or is there a better way? Thank you.