So first of all let me explain what I want to achieve:
I want to create a basic .NET Core console application which is responsible for loading external extensions (more on this later on), listening for events, connection handling etc.
Let's assume this application is a Discord bot or Amazon's Alexa. It is responsible for starting, shutting down, connecting and so on. This core application relies on a external Nuget package.
But you want to provide a system to extend this basic application with a plug n play system. So instead of extending the core Git repository (e.g. on Github) you would create another repository with a .NET Core library which provides a new feature/command/skill. This extending project also adds a dependency to the external Nuget package.
At the end you would have a core application in one repository and multiple repositories extending the core application.
How to develop this?
Let's assume
- Developer A creates the core application in a repository myApp.core
- Developer B wants to create a "Hello World" command in a separate repository myApp.extensions.hello-world
- Developer C wants to create a "Ping" command in a separate repository myApp.extensions.ping
Developer A could work on the application it's easy to test locally.
Developers B and C create libraries for their features. To get their libraries loaded into the application Developer A loads all DLL files from a specific directory "Extensions" during startup.
The external Nuget package searches for every implementation of commands. So those extending projects only provide implementations of new commands. The core application only provides connection handling etc.
But how could Developers B and C test their new features if they want to debug the libraries in their IDEs? They can't run that library so they have to test that library by running the core application.
Things might get tricky if developer A is an employee and developer B and C are just customers creating their own commands but don't have access to the core application.
So how would developers B and C debug their libraries locally then? Are there any better approaches for this? Maybe Docker helps out?
Let me give a real world scenario
Developers A, B and C want to create a Discord bot.
- Developer A creates a repository for the bot core functionality e.g. connecting against the Discord chat
- Developer B creates another repository for a simple bot command
- Developer C creates another repository to listen for new users in a specific guild
All three developers import the Nuget package for the Discord C# library. Developers B and C only create libraries with command/event implementations of interfaces provided by that Nuget library.
B wants to test the command, C wants to test the event listener. Both have to run the bot from the repository of A. Or not?