Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.0k views
in Technique[技术] by (71.8m points)

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

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:UsersMyUserAppDataLocalASP.NETDataProtection-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:devMyWebsitesrcMyWebsite

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 ?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...