I'm working on a web shop application written in ASP MVC Core .NET 6 designed to be deployed multiple times - once per country. All deployments will be similar to itself (all are meant for the same client) with small differences in layout and features. Each instance will have it's own database. Configuration of each instance is stored in database, so in my application there is only connection string that differs between instances.
As I have written it, I have single webshop engine written as a class library, one single MVC application (containing all controllers, middlewares etc.) targeting that class library and a set of many different Razor Class Libraries (RCL) containing specific layouts for each country instance. Each RCL is also targeting the webshop class library (I have RCL.EN lib for english webshop instance, RCL.DE lib for german instance and 40 countries more).
Now the problem I'm facing is that I have all that in a single solution with one app, one engine class library and many frontend RCL libs. During deployment with VS2022 I'm deploying all fontend RCL libraries at once, while I need a way to conditionally include only one Lib per deployment.
I can exclude manually unused languaged before deployment so only one is deploying, but having 40+ countries require lots of unnecesserily work.
Can I create environment configs for 40 countries with 40 sets of deployments? Or maybe use gitlab pipelines for that?
I have found out that I can use VS Configuration Manager to create multiple build configurations - one per language.