NOTE: Aspire does not yet support loading projects by path alone. This is for if/when it does...
1: Add a reference to this library from your AspireHost app 2: Make sure the reference in your csproj is in the following format
3: Right-click your AppHost project and select "Add -> Existing item" 4: Browse to find the SLN file you want to use, then select it 5: Click the drop-down icon at the right side of the Add button, select "Add As Link" 6: Click the added SLN file in your solution explorer 7: View the properties for that file (F4) 8: Set the Build Action to "C# analyzer additional file"
If the name of your solution is MicroService1 and it contains projects Web.Api.csproj and MyFunctions.csproj then you can do this in your AppHost Program.cs file
builder.AddProject<Solution_MicroService1.Web_Api>("some-unique-name"); builder.AddProject<Solution_MicroService1.MyFunctions>("some-unique-name");
// If you have added multiple sln files then you can use those too builder.AddProject<Solution_MicroService2.SomeOtherApp>("some-unique-name");