Visual Studio 2017 stopped working with dock

In Visual Studio 2017 I am working on a project with three main dotnet projects. He built and launched containers using docker-compose as his starter project. Now it throws an error that it cannot find a container starting with the given name. In the Output window, Show Output From: selected docker

displays the combined docker-compose.yml files.

It looks like it doesn't create containers, so it can't find the container it looks for by name. After seeing this, I ran all the Docker commands in PowerShell and it built the images and started the containers right away. With containers installed, Visual Studio started but gave a different error.

I am wondering why Visual Studio will no longer create containers.

Note. I've had problems in the past when spinning up containers with Docker Cli: Visual Studio threw exceptions, but I cleaned up Docker working with containers, network, volume and images ...

enter image description here

Thank you in advance for your help. I love Docker, but there are some frustrations using VS tools so far ...

+5


source to share


3 answers


Make sure in Build> Configuration Manager you have the Docker project set to build in debug mode - this disconnect was not caused by this issue for me and repeated ticking, it turned out to be the solution.



+7


source


Do you run the project by clicking the "Docker" button at the top of the VS2017 window? This should build and run the correct container.



0


source


In my case, I included the Resharper build, which confused Visual Studio. Switching to a regular Visual Studio build in Resharper β†’ Options β†’ Tools β†’ Build

solved the problem for me.

It also sometimes helps to right-click an item docker-compose

in Visual Studio and select Clear. This causes Visual Studio to call docker-compose kill

which gives you a new status. Note that the output from this process appears in the Build window, not the Docker window.

0


source







All Articles