gpt4 book ai didi

c# - 在 Docker 上调试会抛出错误

转载 作者:太空宇宙 更新时间:2023-11-03 15:17:14 25 4
gpt4 key购买 nike

我刚刚创建了简单的 DotNetCore WebApi 并通过 Visual Studio 2015 Update 3 添加了 Docker 支持(尽可能最新)。在 docker 上运行调试,当我尝试在 docker 上调试它时出现以下错误。

The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use Microsoft.NETCoreApp 1.0.0 or newer. This may be expected if the target process did not run .NET code.

知道如何解决这个问题吗?

旁注

Dockerfile.debug

FROM microsoft/dotnet:1.0.0-core

调试输出

VERBOSE: Setting: $env:CLRDBG_VERSION = "VS2015U2"
VERBOSE: Setting: $env:REMOTE_DEBUGGING = 0
VERBOSE: Executing: docker exec -i 64495b0eae7c /clrdbg/clrdbg --interpreter=mi
Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
The program '' has exited with code 145 (0x91).

Docker 输出

C:\Users\kal-el\Documents\Visual` Studio` 2015\Projects\Krypton\src\Krypton\DockerTask.ps1 -Run -Environment Debug -Machine '' -RemoteDebugging $True -OpenSite $False
VERBOSE: Setting: $env:CLRDBG_VERSION = "VS2015U2"
VERBOSE: Setting: $env:REMOTE_DEBUGGING = 1
VERBOSE: Executing: docker-compose -f 'C:\Users\kal-el\Documents\Visual Studio
2015\Projects\Krypton\src\Krypton\bin\Docker\Debug\app\docker-compose.Debug.yml' -p krypton up -d
Recreating krypton_krypton_1
C:\Users\kal-el\Documents\Visual` Studio` 2015\Projects\Krypton\src\Krypton\DockerTask.ps1 -WaitForUrl -Machine ''
VERBOSE: Setting: $env:CLRDBG_VERSION = "VS2015U2"
VERBOSE: Setting: $env:REMOTE_DEBUGGING = 0
Opening site http://docker ........................................................................................................................
Validating volume mapping in the container 64495b0eae7c
ValidateVolumeMapping : Unable to validate volume mapping. For troubleshooting, follow instructions from
http://aka.ms/DockerToolsTroubleshooting
At C:\Users\kal-el\Documents\Visual Studio 2015\Projects\Krypton\src\Krypton\DockerTask.ps1:352 char:9
+ ValidateVolumeMapping
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,ValidateVolumeMapping

Question posted on GitHub

最佳答案

正在升级 Docker Tools for Visual Studio 2015 - Preview v0.31.0 解决了这个问题。

关于c# - 在 Docker 上调试会抛出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38591990/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com