I have just updated my Visual Studio community 2019 to version 16.9.1. But I am not able to see the WSL2 profile as mentioned in this document.
Also, my machine has all the Prerequisites.
I have tried with the existing and new console app, web app with target framework .net core 3.1 and .NET 5, but not showing the option.
Also, I have tried adding the below settings to the launchSettings.json file, but when running with this change, it shows the error
The Project does not know how to run the Profile WSL 2.
"WSL 2": {
"commandName": "WSL2",
"launchBrowser": true,
"launchUrl": "https://localhost:5001",
"environmentVariables": {
"ASPNETCORE_URLS": "https://localhost:5001;http://localhost:5000",
"ASPNETCORE_ENVIRONMENT": "Development"
},
"distributionName": ""
}