将Docker支持添加到.net核心应用后,我尝试在Docker中调试该应用并收到以下错误:
无法运行命令:“c:[项目位置] \ src [appname] \ Docker \ DockerTask.ps1-运行-环境调试-机器'default'-OpenSite $ False -RemoteDebugging $ True”,单击以获取更多详细信息。
docker 容器已开始不确定出了什么问题。
最佳答案
证明它是因为我正在使用Docker for Windows beta。
您需要转到应用程序下的Properties文件夹,然后编辑Docker.props文件。
默认:
<!-- Use this property to change the docker host that is used by this project. Delete default, leaving the value blank for the Docker for Windows beta
(Note: you need to restart VS after changing this property) -->
<DockerMachineName Condition=" '$(DockerMachineName)'=='default' "></DockerMachineName>
如命中所说,从DockerMachineName中删除默认值。注意:我必须重新启动PC才能使其正常工作。
编辑:
<DockerMachineName Condition=" '$(DockerMachineName)'=='' "></DockerMachineName>
关于docker - 无法通过VS2015运行网络核心Docker容器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37461740/