dockervisual-studioasp.net-core.net-coredocker-compose

Visual Studio 2022 - Add Container Orchestrator Support - No "Docker Compose" option?


I created a ASP.NET Core 7 WebAPI project and now I want to add docker support (with docker-compose).

I installed the latest version of Docker Desktop and Visual Studio. I followed this Microsoft documentation (and several other tutorials found online) but somehow, when trying to add Orchestrator Support, I only get the "Service Fabric" option. I would expect the "Docker Compose" option to show as well.

As you can see, only "Service Fabric" option is shown.

I installed all workloads in Visual Studio as described (Web Development, Azure Tools and .NET cross-platform development).

I tried different things:

I'm aware that adding Docker-Compose to the project manually would be an option, but still, I'd like to know what I'm doing wrong in this case.

I'm running Windows 11, Visual Studio 2022 (17.7.6) and Docker Desktop 4.25.0 (126437).


Solution

  • Make sure your project is in a folder under the solution. If the project file is at or above the solution file you can't add compose support.