Skip to content

VS 2026: Docker Compose: Cannot debug ASP.NET Framework 4.7 project with IIS windows container #463

@kamranayub

Description

@kamranayub

Been using VS 2022 with Container Tools for months now without too much of an issue.

I just upgraded to VS 2026 this week and everything is working... except debugging.

I have a web project that is .NET Framework 4.7.1 and is configured to run under IIS in Windows Server Core 2022.

FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2022 

# etc...

WORKDIR /inetpub/wwwroot
COPY ${source:-obj/Docker/publish} .

The docker compose project is configured to launch the web project/service:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" Sdk="Microsoft.Docker.Sdk">
  <PropertyGroup Label="Globals">
    <ProjectVersion>2.1</ProjectVersion>
    <DockerTargetOS>Windows</DockerTargetOS>
    <DockerPublishLocally>True</DockerPublishLocally>
    <ProjectGuid>69dae30f-922a-4e5a-b2a3-3baf4a11c33b</ProjectGuid>
    <DockerLaunchAction>LaunchBrowser</DockerLaunchAction>
    <DockerServiceUrl>http://{ServiceHost}:{ServicePort}</DockerServiceUrl>
    <DockerServiceName>web</DockerServiceName>
  </PropertyGroup>
  <ItemGroup>
    <None Include="docker-compose.override.yml">
      <DependentUpon>docker-compose.yml</DependentUpon>
    </None>
    <None Include="docker-compose.yml" />
  </ItemGroup>
</Project>
Image

I have two profiles, but worth noting I've only been using the first one. I added the second explicitly to try and figure out why VS2026 wasn't working:

{
  "profiles": {
    "Docker Compose": {
      "commandName": "DockerCompose",
      "commandVersion": "1.0",
      "serviceActions": {
        "web": "StartWithoutDebugging",
        "db": "StartWithoutDebugging",
        "api": "StartWithoutDebugging",
        "jobs": "StartWithoutDebugging"
      }
    },
    "Debug Website": {
      "commandName": "DockerCompose",
      "commandVersion": "1.0",
      "composeLaunchServiceName": "web",
      "serviceActions": {
        "api": "StartWithoutDebugging",
        "db": "StartWithoutDebugging",
        "jobs": "StartWithoutDebugging",
        "web": "StartDebugging"
      }
    }
  }
}

One obvious thing I notice is that in VS 2026, the Docker Compose startup settings is not mapping my projects correctly in the GUI:

Image

Notice too how it is not mapping the "StartDebugging" value either for the web service.

I think this is a regression but it's hard to debug. Maybe I'm missing a component in VS2026 installation that I have in VS2022? As a workaround, I can debug still in VS2022.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions