Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error after modifying launchSettings: The launch profile "(Default)" could not be applied

Tags:

I'm setting up my project to use dotnet watch run in my launchSettings.json under Visual Studio 2019 Preview 16.9.0

Below is my launchSettings.json

{
  "profiles": {
    "MyWebsite": {
      "commandName": "Executable",
      "executablePath": "dotnet",
      "commandLineArgs": "watch run",
      "workingDirectory": "$(ProjectDir)",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      },
      "dotnetRunMessages": "true",
      "applicationUrl": "https://localhost:5001;http://localhost:5000"
    }
  }
}

Here is the ouput when I hit CTRL+F5

watch : Started
The launch profile "(Default)" could not be applied.
A usable launch profile could not be located.
[17:38:49 INF] Starting up
[17:38:49 INF] User profile is available. Using 'C:\Users\MyUser\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
[17:38:50 INF] Now listening on: http://localhost:5000
[17:38:50 INF] Now listening on: https://localhost:5001
[17:38:50 INF] Application started. Press Ctrl+C to shut down.
[17:38:50 INF] Hosting environment: Development
[17:38:50 INF] Content root path: C:\dev\MyWebsite\src\MyWebsite

I don't understand why I have this message :

The launch profile "(Default)" could not be applied.
A usable launch profile could not be located.

According to this solution https://stackoverflow.com/a/65666418/1026105 this is not supposed to happen.

How can I troubleshoot this messages ?

like image 252
JuChom Avatar asked Jan 12 '21 16:01

JuChom


1 Answers

just Change

"MyWebsite": { "commandName": "Executable",

to

"MyWebsite": { "commandName": "Project",

like image 109
Mehmed Cuhadar Avatar answered Sep 30 '22 21:09

Mehmed Cuhadar