Using .NET Aspire in practice
In this section, we will adapt the Kubernetes example of Chapter 8, Practical Microservices Organization with Kubernetes, to run with Aspire. As a first step, let’s copy the whole solution folder into another in a different location, so we can modify it without destroying the previous version.
Then, let’s execute the following steps to prepare the overall solution:
- Add a new App Host project to the solution and call it
CarSharingAppHost. - Add a new .NET Aspire Service Defaults project to the solution and call it
CarSharingServiceDefaults. - Add a reference to the
FakeSource,FakeDestination, andRoutesPlanningprojects to theCarSharingAppHostproject. - Add a reference to the
CarSharingServiceDefaultsproject to theFakeSource,FakeDestination, andRoutesPlanningprojects. - Right-click on the
CarSharingAppHostproject and, in the menu that appears, select Set as Startup Project.
The preceding steps...