Visual Studio 2015 Docker集成不会附加调试 [英] Visual Studio 2015 Docker Integration wont attach for debuging

查看:844
本文介绍了Visual Studio 2015 Docker集成不会附加调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用VS 2015创建了一个默认的.net Core RC2 MVC应用程序。我添加了Docker支持,所以我可以在docker中运行并调试它。



当我运行项目时,它会构建docker容器并启动它。运行命令docker ps显示正在运行的容器映射。但是,我收到以下错误:



目标进程退出而不提高CoreCLR启动事件。确保目标进程配置为使用NETStandard [version ...]或更新版本。如果目标进程没有运行,可能会出现这种情况。





同时尝试访问网页会返回以下错误:



[Fiddler]连接到'10 .0.75.2'失败。
错误:ConnectionRefused(0x274d)。
System.Net.Sockets.SocketException不能连接,因为目标机器主动拒绝它10.0.75.2:80

解决方案

事实证明,这个问题与我正在运行的Windows Beta版Docker有关。默认情况下,它不允许您映射卷。



要启用停靠窗进行窗口设置:



< a href =https://i.stack.imgur.com/SnPhO.png =nofollow noreferrer>



并选择管理共享驱动器。



选择C驱动器或驱动器,您有.Net代码存储在并重建和部署项目:




I created a Default .net Core RC2 MVC app using VS 2015. I added Docker Support so I could run and debug it in docker.

When I run the project it builds the docker container and starts it. Running the command "docker ps" shows the container running with the correct ports mapped. However I get the following error:

The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use NETStandard [version ...] or newer. This might be expected if the target process did not run.

Also trying to access the web page returns the following error:

[Fiddler] The connection to '10.0.75.2' failed. Error: ConnectionRefused (0x274d). System.Net.Sockets.SocketException No connection could be made because the target machine actively refused it 10.0.75.2:80

解决方案

Turns out the problem is related to the docker for windows beta I am running. By default it does not let you map volumes.

To enable open the docker for window settings:

And select Manage shared drives.

Select the C drive or drive you have the .Net code stored on and rebuild and deploy the project:

这篇关于Visual Studio 2015 Docker集成不会附加调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆