❔ Exception thrown in Rider but not in VS2022
I have a web API with a run/debug configuration derived from launchSettings.json. This file defines an environment variable with
When I debug the code under Rider one of my two suspicions is that the following code causes a UriFormatException to be thrown and the api terminates after logging the exception to console.
The exception is not thrown at all when I debug the code in VS2022. In the above code,
The
My other suspicion is hinges on the environment variables defined in the launch profiles for Rider and VS for the API. The Rider profile defines the following variables:
where the Visual Studio profile defines the same set of variables but without
When I debug the code under Rider one of my two suspicions is that the following code causes a UriFormatException to be thrown and the api terminates after logging the exception to console.
The exception is not thrown at all when I debug the code in VS2022. In the above code,
CoreFxWebApplication is declared in a private NuGet package. This suspicion is based on the exception being thrown in the CreateBuilder call above, which looks like this:The
CoreFxWebApplicationBuilder constructor the above code involves the following call:My other suspicion is hinges on the environment variables defined in the launch profiles for Rider and VS for the API. The Rider profile defines the following variables:
where the Visual Studio profile defines the same set of variables but without
ASPNETCORE_URLS. I can't find any usages of this variable in any of the api source code but a lot of functionality is hidden in NuGet packages. I only have this suspicion because with the URL variable only defined in Rider, the code may somehow be trying to create a System.Uri resulting in the exception being thrown.