Hello
I created a fresh new project with the latest version of VS2022.
I checked "Place solution and project in the same directory" during project creation.
Then i added a "Container Orchestrator Support".
Two weird things:
- docker-compose project doesn't depend to WebApplication1 project
- Service action is set by default to StartWithoutDebugging in launchSettings.json
Even if I replace StartWithoutDebugging by StartDebugging in launchSettings.json, the container debug doesn't work.
Docker Compose Launch Settings Ui doesn't show the action. When I click on the dropdown, I only see:
- Do not start
- Start without debugging
I created another fresh new project with "Place solution and project in the same directory" not checked. Then I used the same procedure.
In this case, no issue:
- Dependency between docker-compose and WebApplication1 project is properly set
- Service action is set by default to StartDebugging in launchSettings.json
- Service action is visible in Docker Compose Launch Settings Ui
- Debug is working fine
I'm using:
- Visual Studio 2022 17.5.4
- Rancher-Desktop 1.8.1 with docker-compose version 2.16.0
I get the same results for docker-compose commands executed during Docker Compose Launch Settings Ui loading.
# Solution and project in the same directory
E:\testsVS\root\WebApplication1> "docker-compose" version --short
2.16.0
E:\testsVS\root\WebApplication1> "docker-compose" -f "E:\testsVS\root\WebApplication1\docker-compose.yml" -f "E:\testsVS\root\WebApplication1\docker-compose.override.yml" -p dockercompose13158966672963815539 --ansi never --profile "*" config --services
webapplication1
# Solution and project not in the same directory
E:\testsVS\subfolder\WebApplication1> "docker-compose" version --short
2.16.0
E:\testsVS\subfolder\WebApplication1> "docker-compose" -f "E:\testsVS\subfolder\WebApplication1\docker-compose.yml" -f "E:\testsVS\subfolder\WebApplication1\docker-compose.override.yml" -p dockercompose11554266416052497498 --ansi never --profile "*" config --services
webapplication1
Context paths are ok
# Solution and project in the same directory
E:\testsVS\root\WebApplication1> "docker-compose" -f "E:\testsVS\root\WebApplication1\docker-compose.yml" -f "E:\testsVS\root\WebApplication1\docker-compose.override.yml" -p dockercompose13158966672963815539 --ansi never --profile "*" config
name: dockercompose13158966672963815539
services:
webapplication1:
build:
context: E:\testsVS\root\WebApplication1
dockerfile: Dockerfile
environment:
ASPNETCORE_ENVIRONMENT: Development
image: webapplication1
networks:
default: null
ports:
- mode: ingress
target: 80
protocol: tcp
networks:
default:
name: dockercompose13158966672963815539_default
# Solution and project not in the same directory
E:\testsVS\subfolder\WebApplication1> "docker-compose" -f "E:\testsVS\subfolder\WebApplication1\docker-compose.yml" -f "E:\testsVS\subfolder\WebApplication1\docker-compose.override.yml" -p dockercompose11554266416052497498 --ansi never --profile "*" config
name: dockercompose11554266416052497498
services:
webapplication1:
build:
context: E:\testsVS\subfolder\WebApplication1
dockerfile: WebApplication1/Dockerfile
environment:
ASPNETCORE_ENVIRONMENT: Development
image: webapplication1
networks:
default: null
ports:
- mode: ingress
target: 80
protocol: tcp
networks:
default:
name: dockercompose11554266416052497498_default
Thank you
Best Regards
Hello
I created a fresh new project with the latest version of VS2022.
I checked "Place solution and project in the same directory" during project creation.
Then i added a "Container Orchestrator Support".
Two weird things:
Even if I replace StartWithoutDebugging by StartDebugging in launchSettings.json, the container debug doesn't work.
Docker Compose Launch Settings Ui doesn't show the action. When I click on the dropdown, I only see:
I created another fresh new project with "Place solution and project in the same directory" not checked. Then I used the same procedure.
In this case, no issue:
I'm using:
I get the same results for docker-compose commands executed during Docker Compose Launch Settings Ui loading.
Context paths are ok
Thank you
Best Regards