Closed sabrsorensen closed 4 years ago
@sabrsorensen Hmm - This does not repro on Mac or Windows 10 when using the new WSL2 engine for Docker. It only repros in the Windows hyper-v one. Unfortunately, this likely means it has something to do with dotnet test
and the Docker for Windows implementation itself rather than this extension.
You can repro this directly by running the following from PowerShell from the local folder with the test project:
docker run -it --rm -v ${PWD}:/workspace mcr.microsoft.com/dotnet/core/sdk:3.1 dotnet test /workspace
Since this is coming from inside dotnet itself, would you mind raising this over on either the dotnet/sdk
or microsoft/vstest
repos to get the right engineering team to investigate further? I unfortunately can't move it myself.
@sabrsorensen Ironically, Docker 2.2.0.3 just came out today that may have fixed this. Can you retry? I'm no longer seeing it in Docker 2.2.1.0 (Edge), and I see a number of Windows bind mount issues were fixed in 2.2.0.3.
@Chuxel Thanks for digging into this! I can confirm that upgrading to Docker 2.2.0.3 on Windows has addressed the issue, I'm able to run dotnet test
from the bind mounted workspace successfully.
The above versions are where I first encountered this issue, however I have confirmed this occurs when targeting .NET Core 2.1, 2.2, 3.0, and 3.1 and using the appropriate dotnet/core/sdk tag for the .NET version.
This looks similar to #560, however mounting node_modules as a volume isn't an appropriate workaround for this circumstance.
Steps to Reproduce:
dotnet test
from the bind-mounted source code, in the repo linked above this would be under/workspaces/devcontainer.mstest.repro
.Expected result (based on the repro repo linked above):
Actual result:
Does this issue occur when you try this locally?: No Does this issue occur when you try this locally and all extensions are disabled?: No
Specifying the TestAdapterPath as mentioned in the error output does not resolve the issue,
dotnet test
reports that it cannot locate the adapter at that path, no matter how the path is formatted. https://github.com/microsoft/vstest/issues/1648 indicates that TestAdapterPath may not be supported in .NET Core any longer, so that may be an unrelated issue. Copying the source code to any directory actually within the container then runningdotnet test
from that directory will execute successfully, so this seems to be limited to running from the bind mount workspace.It's only on bind mounts/Open Folder in Container that this occurs,
dotnet test
runs successfully if I use Open Repository in Container to access the repro repo linked above and run the command from the volume mounted workspace.Thank you for your time looking through this, please let me know if there's anything I can help with.