我在笔记本电脑上安装了 .net core 2.0 的x86和x64 sdk(win 7 sp1 x64) . 我不知道为什么vs代码(1.19.3和x64&官方c# extension)总是选择x86运行时自动构建我的控制台并始终遇到错误和弹出消息:“ Only 64-bit processes can be debugged. ” .
然后我尝试了:
我通过运行 "C:\Program Files\dotnet\dotnet" new console 尝试了简单的控制台项目 . 调试时出现错误消息 .
此外,我尝试通过修改文件 .vscode\tasks.json 来强制指向要构建的x64运行时:
{
"version": "2.0.0",
"tasks": [
{
"taskName": "build",
"command": "dotnet", --> change to "C:\\Program Files\\dotnet\\dotnet.exe"
"type": "process",
"args": [
"build",
"${workspaceFolder}/VSDebugCoreTest.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
错误消息仍然存在“只能调试64位进程 . ” .
我有x64 vscode,我有x64 sdk和运行时,我用x64版本的sdk创建和编译,并从内部终端显示编译成功 .
Anyone know why and how to bypass this error and able to debugging? (请不要告诉我安装VS,这对我来说很重要 . )