Closed noh626 closed 1 month ago
So I think you are on the right path on what the issue could be. When using compose in visual studio, we override the entry point with launching your application via the debugger. If you look at the label com.microsoft.visualstudio.debuggee.arguments:
at the very end we tell the debugger to launch C:\app\MyProject.WeatherForecast.dll
.
In the container, is the dll called WeatherForecast.dll
and not MyProject.WeatherForecast.dll
? If so I'm curious how you prefix the MyProject.
because we calculate that based on the value of the msbuild parameter $(TargetPath)
. If I can get a way to make a repro project I can try to figure out why its different.
A work around for now if you are on the latest VS, you can right click on your compose project -> Add -> VS Compose Override Files. This will create 2 files (one each for debug/release) that overrides those values. Un comment the services, service name, labels and the com.microsoft.visualstudio.debuggee line. On that line replace $debuggee_arguments_probing_paths_MyProject.WeatherForecast$
with --additionalProbingPath c:\.nuget\packages
and C:\app\MyProject.WeatherForecast.dll
with C:\app\<dll file name>.dll
replacing \<dll file name> with whatever the name of the final dll is.
Is there any resolution to the issue?
We assume the issue was resolved. Have you tried what @patverb mentioned above, that is the intended or recommended. This should be closed based on a lack of response. If you still hitting an issue, please open a new issue.
Hi,
I'm attempting to integrate Docker support into my solution, but I'm facing issues when using docker-compose.
To diagnose the problem, I created a test ASP project within my existing solution, Then, I added Docker support and orchestrator to this test project.
When I run the project using Docker directly from Visual Studio, everything works fine.
However, the problem arises when I try to run the docker-compose project. Docker returns the below error. Interestingly, when I replicate the same project structure in a brand new solution, everything works fine with docker-compose.
As part of troubleshooting, I modified the entry point to target an ".exe". But docker continues to search for a ".dll".
Is this issue related to adding a specific prefix to output binaries? I've configured my project to prepend a "MyProject" prefix to the output binaries, leading to filenames like "MyProject.WeatherForecast.dll" or "MyProject.WeatherForecast.exe". => I don't think this is the culprit. I just tried a new solution with the prefix. It still works.
This is the log from Container Tools.
Dockerfile
Docker-compose.yml
My project structure