Dockertools: Visual Studio hangs / freezes while creating an api project with docker support

Created on 23 Aug 2018  路  7Comments  路  Source: microsoft/DockerTools

Sometimes the IDE hangs / freezes when I try to create a new .Net Core Api project with docker support.

After restarting the IDE, reloading the project and trying to run it, the project gives the following error:

grafik

Visual Studio 2017 Version: 15.8.1
Docker Version: 18.06.0-ce-win72 (19098)

bug

All 7 comments

What version of .NET Core, 2.0 or 2.1? Is Https enabled? Can you attach another instance VS 2017 and produce a dump file?

Regarding the hang/freeze, this is a known issue we are hoping to fix soon.
Regarding the popup error window, this issue occurs because the Microsoft.VisualStudio.Containers.Tools.Targets NuGet package hasn't finished being restored yet. Unfortunately, F5 isn't prevented before restore has finished. You'll need to wait until NuGet restore finishes, then try again.
If it still is persisting, it's possible it failed to add the NuGet package to the project; try adding Docker support again to the same project (no need to recreate, just right click the project > Add > Docker Support).
We have a task to improve this experience in the future.

@dbreshears It's .NET Core 2.1

@bwateratmsft F5 was not involved. I managed to reproduce the freeze right after starting visual studio and creating a new project and also with creating several new projects, one after another.

Here's a dump right after starting visual studio, no F5 involved:
devenv_freeze_on_new_project_without_heap.zip

This one is after creating other projects (but also no F5 involved):
devenv_freezes_on_project_creation_without_heap.zip

I also have the bigger ones with heap, if required :)

@krimsar Yes, the freeze is a separate issue from the F5. The F5 one I was referring to was the "doesn't know how to run the profile Docker"--every time I've seen that one it goes away once the Nuget restore finishes.
Regarding the freeze, I took a look at your dump files. I can't say with certainty what is deadlocked, but I do notice that ReSharper is holding an awful lot of blocking threads, including the main thread. See if your results improve at all with ReSharper disabled temporarily.

So what's the status on this issue? I can't create a project with Docker support. I have got both problems described here. There is no Nuget Package called Microsoft.VisualStudio.Containers.Tools.Targets, but I have one called Microsoft.VisualStudio.Azure.Containers.Tools.Targets.

@eluchsinger These should both be fixed in VS 15.9 Preview 3 when it is available.

Still not fixed, running VS 15.9.11.

Was this page helpful?
0 / 5 - 0 ratings