我刚刚将我的 Visual Studio 社区 2019 更新到了 16.9.1 版。但是我看不到 this 中提到的 WSL2 配置文件文档。
另外,我的机器有所有 Prerequisites .
我已尝试使用现有和新的控制台应用程序、目标框架为 .net core 3.1 和 .NET 5 的 Web 应用程序,但未显示该选项。
另外,我尝试将以下设置添加到 launchSettings.json 文件中,但是在使用此更改运行时,它显示错误
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": ""
}
最佳答案
关于c# - Visual Studio 未显示 WSL2 启动配置文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66599090/