Visual Studio 2015 Docker Integration wont attach

2019-04-10 02:22发布

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.

enter image description here

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

1条回答
干净又极端
2楼-- · 2019-04-10 02:49

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:

Docker for windows 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:

Docker settings with C share enabled

查看更多
登录 后发表回答