In a true microservices-based system, each microservice has its own code base and lives in its own repo. This is also true for the frontend and inspired by the popular Twelve-Factor App.
However, the App Host project requires project references to each of the microservices that it will host, which is not possible if those live in other repos:
var apiservice = builder.AddProject<Projects.AspireApp_ApiService>("apiservice");
Sadly that kind of thing would not make sense in a real microservices-based system where you have dozens of repos, each one dedicated to one, and only one microservice.
Ideally, I would spin up a new repo that would have only my App Host and Service Defaults project, and the App Host project there would still be able to discover and host all my microservices.
How to achieve this?
P.S The fact that the eShop project lives in a single repo is a bad practice, even when it shows great patterns for implementing microservices (and seems to make use of Aspire).
In a true microservices-based system, each microservice has its own code base and lives in its own repo. This is also true for the frontend and inspired by the popular Twelve-Factor App.
However, the App Host project requires project references to each of the microservices that it will host, which is not possible if those live in other repos:
Sadly that kind of thing would not make sense in a real microservices-based system where you have dozens of repos, each one dedicated to one, and only one microservice.
Ideally, I would spin up a new repo that would have only my App Host and Service Defaults project, and the App Host project there would still be able to discover and host all my microservices.
How to achieve this?
P.S The fact that the eShop project lives in a single repo is a bad practice, even when it shows great patterns for implementing microservices (and seems to make use of Aspire).