简体   繁体   中英

Cant add Docker Support Visual Studio 2017

I'm using VS 2017. I have a web service and I want to add docker support to it. When I right click and open up the menu to add docker support it is greyed out. What causes it to be greyed out? How can I add docker support to my app?

*Side note I went up to the solution and added a new project (web app) and when it's done adding that new project I'm able to add docker support to it but still not able to add support to my other web service. Also both projects are targeting .net Framework 4.5.2

Edit the.csproj file and search for "docker" - remove the following line:

<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>

Also delete the file "Dockerfile" which should be in the same folder as the.csproj file.

Try double-checking your.csproj, .sln, and solution and project folders for any references to Docker. There have been a few times where I have run into this, usually caused by adding, removing, and trying to re-add Docker support. Clearing out the Dockerfile in the project folder along any other Docker stuff in the solution solved the issue in my case.

That could be because of your solution already contain docker-compose with dockerignore and docker-compose.yml.

If you want to add it again, Try to remove it and check.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM