I have created an out of the box ASP.NET Core 6 Web API project.
When I launch the project I can see Swagger loaded, displaying a single WeatherForecast endpoint which works when tested.
However, when I launch the Web API project from another .NET Core app, the controllers are not discovered. Swagger returns the following message for reference. Also manually calling the endpoint Url fails.
After some investigation into this issue, I found that if I register the WeatherForecast controller manually it will become visible in Swagger and accessible when requested.
Why is the WeatherForecast controller not being discovered when running the ASP.NET app from another .NET Core App ?
Source Code: GitHub