【发布时间】:2021-11-03 14:15:43
【问题描述】:
我曾尝试运行 Visual Studio 代码,以构建、启动和调试(使用omnisharp 和 dotnet...)blazor 服务器和 webasm 项目,但似乎一次只启动一个项目,即使 task.json 两者都有的项目?有没有办法同时启动两个项目?还是让一个执行,而另一个启动,以防万一这是不可能的?
这是我的 launch.json
{
"version": "0.2.0",
"configurations":
[
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/BlazorApp/bin/Debug/net5.0/BlazorApp.dll",
"args": [],
"cwd": "${workspaceFolder}/BlazorApp",
"stopAtEntry": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_URLS": "http://localhost:5010"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
},
{
"type": "blazorwasm",
"name": "Launch and Debug Blazor WebAssembly Application",
"request": "launch"
}
]
}
【问题讨论】:
-
或许这篇文章可以帮到你:swaminathanvetri.in/2021/01/02/…
-
@JasonD 我的意思是我试过但唯一的方法似乎是单独启动每个
标签: visual-studio-code blazor blazor-server-side blazor-webassembly asp.net-blazor