Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 无法在Visual Studio 2019中使用Docker容器附加调试器-错误_Visual Studio_Docker_Asp.net Core_.net Core_Docker Compose - Fatal编程技术网

Visual studio 无法在Visual Studio 2019中使用Docker容器附加调试器-错误

Visual studio 无法在Visual Studio 2019中使用Docker容器附加调试器-错误,visual-studio,docker,asp.net-core,.net-core,docker-compose,Visual Studio,Docker,Asp.net Core,.net Core,Docker Compose,我正在尝试在使用docker compose构建容器后使用运行Visual Studio调试器。容器构建良好并启动,所有容器都列在容器视图中。输出窗口显示一切正常,然后为每个服务发出8个命令: ========== Debugging ========== docker ps --filter "status=running" --filter "label=com.docker.compose.service" --filter "name=^

我正在尝试在使用docker compose构建容器后使用运行Visual Studio调试器。容器构建良好并启动,所有容器都列在容器视图中。输出窗口显示一切正常,然后为每个服务发出8个命令:

========== Debugging ==========
docker ps --filter "status=running" --filter "label=com.docker.compose.service" --filter "name=^/dataapi$" --format {{.ID}} -n 1
e2490aa5ec53
docker ps --filter "status=running" --filter "label=com.docker.compose.service" --filter "name=^/statisticsapi$" --format {{.ID}} -n 1
275a0475c7f6
docker ps --filter "status=running" --filter "label=com.docker.compose.service" --filter "name=^/wellspacingapi$" --format {{.ID}} -n 1
99a1b4c77f28
docker ps --filter "status=running" --filter "label=com.docker.compose.service" --filter "name=^/dataworkflowsapi$" --format {{.ID}} -n 1
b900708dc919
docker ps --filter "status=running" --filter "label=com.docker.compose.service" --filter "name=^/griddingapi$" --format {{.ID}} -n 1
6d05117e9f5a
docker ps --filter "status=running" --filter "label=com.docker.compose.service" --filter "name=^/apigatewayocelot$" --format {{.ID}} -n 1
542dfca93543
docker ps --filter "status=running" --filter "label=com.docker.compose.service" --filter "name=^/identityserver$" --format {{.ID}} -n 1
74b5552affaa
docker ps --filter "status=running" --filter "label=com.docker.compose.service" --filter "name=^/loginserverapi$" --format {{.ID}} -n 1
c4ff67ab6a7a
然后,我得到一个“Microsoft Visual Studio”错误对话框8次,每个微服务一次,显示:

One or more errors occurred.

Failed to launch debug adapter.  Additional information may be available in the output window.

The operation was cancelled.

The program '' has exited with code -1 (0xffffffff).
The program '' has exited with code -1 (0xffffffff).
The program '' has exited with code -1 (0xffffffff).
The program '' has exited with code -1 (0xffffffff).
The program '' has exited with code -1 (0xffffffff).
The program '' has exited with code -1 (0xffffffff).
The program '' has exited with code -1 (0xffffffff).
The program '' has exited with code -1 (0xffffffff).
对话框的图片:

更令人沮丧的是,我的同事拥有与我完全相同的机器、软件和软件版本,而且对他有效。我的软件版本:

Visual Studio: 16.9.2
Docker version 20.10.5, build 55c4c88

dotnet --info:

.NET SDK (reflecting any global.json):
 Version:   5.0.201
 Commit:    a09bd5c86c

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19042
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\5.0.201\

Host (useful for support):
  Version: 5.0.4
  Commit:  f27d337295

.NET SDKs installed:
  5.0.201 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.All 2.1.26 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.26 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.26 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
我研究过其他类似的问题,但他们的解决方案都不适合我。非常感谢您的帮助