
So you just needs 2 lines in your Dockerfile for debugging to actually work FROM microsoft/aspnetcore:2.0 AS base Next our Dockerfile was doing too many things which VS debugger kind of just ignores.
#Docker mount volume filewatcher detect changes update
To correct that we update our docker-compose.yml to version: '3' the Volume mount is generated as - C:\Users\tarlabs\Desktop\AspNetCoreMultiProject:/app This gave me a hint that the dynamic docker-compose.vs.debug.g.yml file takes the volume mount based on the context given in your docker-compose.yml. This gave me a hint as the docker-compose.yml was version: '3' Adding one project with Docker support and later adding another project with docker support. After looking in every setting I could not find this path anywhere. Now I went inside the container and realized that the Web.dll is insider /app/Web/bin/Debug/netcoreapp2.0/Web.dll but the debugger is expecting it to be on /app/bin/Debug/netcoreapp2.0/Web.dll. So whether you build and put the files inside that or you don't do anything won't make a difference. Looking at Volume mount C:\Users\tarlabs\Desktop\AspNetCoreMultiProject:/app, I was like Wow! Anything that you have in your /app folder in your Dockerfile, will be just overridden by that mount. Volume mount C:\Users\tarlabs\Desktop\AspNetCoreMultiProject:/app.The working directory for debugging is always set to /app using .workingdirectory.The .arguments has a value with path bin/Debug/netcoreapp2.0/Web.dll.The ENTRYPOINT we define won't make a difference during debugging as it overridden by VS with tail -f /dev/null.C:\Program Files\dotnet\sdk\NuGetFallbackFolder:/root/.nuget/fallbackpackages:roĬom.: "dotnet"Ĭom.: " -additionalProbingPath /root/.nuget/packages -additionalProbingPath /root/.nuget/fallbackpackages bin/Debug/netcoreapp2.0/Api.dll"Ĭom.: "/app"Ĭom.: "/bin/bash -c \"if PID=$$(pidof -x dotnet) then kill $$PID fi\""Ĭom.: " -additionalProbingPath /root/.nuget/packages -additionalProbingPath /root/.nuget/fallbackpackages bin/Debug/netcoreapp2.0/Web.dll" C:\Users\tarlabs\.nuget\packages\:/root/.nuget/packages:ro C:\Users\tarlabs\vsdbg:/remote_debugger:ro

C:\Users\tarlabs\Desktop\AspNetCoreMultiProject:/app NUGET_FALLBACK_PACKAGES=/root/.nuget/fallbackpackages

After looking at the build process for your project I found belowĭocker-compose -f "C:\Users\tarlabs\Desktop\AspNetCoreMultiProject\docker-compose.yml" -f "C:\Users\tarlabs\Desktop\AspNetCoreMultiProject\" -f "C:\Users\tarlabs\Desktop\AspNetCoreMultiProject\obj\Docker\docker-compose.vs.debug.g.yml" -p dockercompose15184637154516733497 killĭocker-compose.vs.debug.g.yml version: '3' So I installed VS 2017 and had a dig at this to understand what goes on here.
