Thanks for reaching out it appears that your new minimal API project currently contains 2 launchSettings.json files-one at the root of the new API project and another inside the properties folder.
Explanation
Visual Studio uses the launchSettings.json file that resides in the properties folder of each project to configure how the project is launched (e.g., environment variables, URLs, and profiles).
Having 2 launchSettings.json Files in different location can cause confusion, but only the one located under the properties folder of the current project is used by Visual Studio at build and runtime.
Recommended action
1. keep only the launchSettings.json file located in the properties folder of your new minimal API project.
2. Delete or remove the extra:
Launchsettings.json file exists at the root level of the project.
· This extra file may have been copied over when you imported the minimal API project.
· It is not recognized by Visual Studio and can safely be removed.
Verification steps
To verify the correct file is being used:
1. in Visual Studio, open the project properties-> debug tab.
2. Check the profiles listed there: they correspond to entries inside the active launchSettings.json (from the properties folder).
3. Run the project-Visual Studio should correctly apply the configuration from that file.
Reference
ASP.NET Core runtime environments | Microsoft Learn
Aspire and launch profiles - Aspire | Microsoft Learn
Let me know if you need any further help with this. We'll be happy to assist.
If you find this helpful, please mark this as answered.