我刚刚将 Visual Studio 社区 2019 更新到版本 16.9.1。但我无法看到 WSL2 配置文件,如中提到的this https://learn.microsoft.com/en-us/visualstudio/debugger/debug-dotnet-core-in-wsl-2?view=vs-2019#start-debugging-with-wsl-2文档。
另外,我的机器有所有先决条件 https://learn.microsoft.com/en-us/visualstudio/debugger/debug-dotnet-core-in-wsl-2?view=vs-2019#prerequisites.
我尝试过使用现有的和新的控制台应用程序、具有目标框架 .net core 3.1 和 .NET 5 的 Web 应用程序,但没有显示该选项。
另外,我尝试将以下设置添加到 launchSettings.json 文件中,但是在使用此更改运行时,它显示错误
该项目不知道如何运行配置文件 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": ""
}
请检查您是否安装了以下组件。因为我们需要手动安装。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)