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
, andRoutesPlanning
projects to theCarSharingAppHost
project. - Add a reference to the
CarSharingServiceDefaults
project to theFakeSource
,FakeDestination
, andRoutesPlanning
projects. - Right-click on the
CarSharingAppHost
project and, in the menu that appears, select Set as Startup Project.
The preceding steps...