skip to Main Content

Since the Visual Studio 2022 17.5 update my builds have been taking ages – instead of ~10 seconds, I’m now waiting ~10 20 minutes or more.

If I look in the ‘Container Tools’ window I can see a docker build command being executed, and in the ‘Background tasks’ I see the message…

Warming up Docker debugging for project [my startup project]

I think this feature (added in the 17.5 update) seems to be triggered by the presence of a DOCKERFILE in the project.

While it’s true that this main project (and others in the solution) does contain a DOCKERFILE, my team don’t run these locally; we only build the containers in our devops pipeline after local development.

Furthermore, the base image we use is windowsservercore-ltsc2022, which is not what I run locally, so it’s incompatible with my local system anyway.

Can I turn off this feature?


UPDATE
Some additional points:

  • This long build time only occurs after restarting Visual Studio.
  • I have Docker Desktop installed but not running. (I’ve repeated the steps with Docker Desktop already running, and it makes no difference.)
  • If I rename DOCKERFILE to, say, _DOCKERFILE then the problem goes away.
  • The solution in question is .NET Framework.

UPDATE 2
Even after renaming DOCKERFILE to _DOCKERFILE, the first build after restarting Visual Studioo still attempts to debug in a container – I see this in the Container Tools window…

66>——- Started building project: [name of my .NET Framework project] 66>Container warmup in progress – waiting for this to complete. See the Container Tools output pane for details.

I had to cancel the build after 45 minutes because it still hadn’t completed. There must be a way to disable this feature?

2

Answers


  1. The warm-up behavior can be disabled in the options dialog. Full details: https://learn.microsoft.com/en-us/visualstudio/containers/container-build#project-warmup

    Example for disabling for a single project:
    enter image description here

    Example for disabling Docker Desktop Checks:
    enter image description here

    As an aside, if you choose any launch profile other than Docker, warm-up shouldn’t even be considered on the next VS launch. To change your launch profile click on the down arrow on the Debug button:
    enter image description here

    Login or Signup to reply.
  2. In my case, it was fixed opening the .csproj.user and changing the ActiveDebugProfile from Docker to https

    <ActiveDebugProfile>https</ActiveDebugProfile>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search