Hi Mara McConnell,
Thank you for reaching out to Microsoft Q & A forum.
This issue is likely caused by the absence of a launchSettings.json file. This file is essential for defining the application's URL and environment settings during local development. Without it, the application might not run at the expected URL or be properly configured to serve Swagger.
To resolve this issue, create the missing launchSettings.json file. This file configures the application's URL, specifies whether HTTPS should be used, and sets environment variables.
1.Create the launchSettings.json File
In your project directory, navigate to the Properties folder.
If the Properties folder doesn’t exist, create it.
Inside the folder, create a file named launchSettings.json.
2.Add Configuration to the File
Paste the following content into launchSettings.json:
{
"profiles": {
"PrintFramerAPI": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
"applicationUrl": "http://localhost:5000",
3.Run the Application
Save your changes (Ctrl+S),
Restart the application using the following command:
dotnet run
Please feel free to contact us if you have any additional questions.
If you have found the answer provided to be helpful, please click on the "Accept answer/Upvote" button so that it is useful for other members in the Microsoft Q&A community.