In our company, we develop information system software in C#.NET, which has client-server-module architecture. Module project does not depend directly on server/client project, but only on shared parts. So the structure of core projects looks like this with their dependencies:
- server depends on
- server-shared library
- common-shared library
- client depends on
- client-shared library
- common-shared library
And module structure looks like this:
- module depends on
- server-shared library
- client-shared library
- common-shared library
We use Git and dependencies are put in place using submodules. But this leads to "submodule hell" - in a project, which contains only pure client and server, we already have some libraries (common-shared) twice. So developing them is hard, because we can change only one "copy" at a moment and this leads to version incompatibility, when we run client and server together.
Modules make it even more complicated and unusable, because they just multiply libraries copies. When some module is built with bad version of library, it can lead to incompatibility with client and server.
One mentionable solution is to set the projects to depend on the libraries on upper level of directory tree, but that I think is a misconception. It also makes building repositories using CI impossible.
Second solution would be a monorepo, but that throws away a possibility to track issues in our GitLab instance separately, et cetera...
Third solution is maybe using NuGet, but that makes library projects undevelopable (we would have to write some "test project" for developing it separately).
What is the most optimal solution for this codebase?
Thank you very much!