The --launch-profile option of `dotnet run` and `dotnet watch run` should fallback to a case-insensitive match if a case-sensitive match isn't found
See original GitHub issueToday, dotnet run --launch-profile profilename
and dotnet watch run --launch-profile profilename
are case-sensitive and if a matching profile is not found in launchSettings.json
an error message is displayed but the project is run anyway, e.g.:
launchSettings.json
{
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:5130",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"HTTPS": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:7175;http://localhost:5130",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
$ dotnet run --launch-profile https
The launch profile "https" could not be applied.
A profile with the specified name could not be found or is not a valid JSON object.
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://localhost:5000
It would be more user-friendly in cases like this to simply fallback to a case-insensitive match if a case-sensitive match is not found first.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
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.
Read more >How to enable case-insensitive property name matching ...
Learn how to enable case-insensitive property name matching while serializing to and deserializing from JSON in .NET.
Read more >Aspnet Core Project Json | PDF | Microsoft Visual Studio
Run the app (the dotnet run command will build the app when it's out of date): ... Text matching is case-insensitive and based...
Read more >Routing is case sensitive? : r/Blazor
I think I'm just missing something here. How can I have case-insensitivity without having to code the controller name into the Route attribute ......
Read more >aspnet-core-project-json
Run the app (the dotnet run command will build the app when it's out of ... Text matching is case-insensitive and based on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the help narrowing down on this. I put it in the 7 backlog and we’ll get to it as we can! I do think this would be a good area for @nagilson after he tackles the various Release configuration/RID inference changes for 7 if nothing else crazy pops up.
What about something like this:
http
in your image above), then accept any case