Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying Host Machine in Visual Studio doesn't seem to work #363

Closed
Andomeda83 opened this issue Dec 14, 2022 · 2 comments
Closed

Specifying Host Machine in Visual Studio doesn't seem to work #363

Andomeda83 opened this issue Dec 14, 2022 · 2 comments

Comments

@Andomeda83
Copy link

I'm not using Docker Desktop, instead I have the docker cli installed on my Windows host as well as on a Ubuntu WSL instance.

From a windows command line, I can specify the WSL host and it works as expected:

> docker images
REPOSITORY                                                 TAG       IMAGE ID       CREATED        SIZE
mcr.microsoft.com/cosmosdb/windows/azure-cosmos-emulator   latest    b95ffb8c77b6   9 months ago   13.1GB

> docker -H localhost:2375 images
REPOSITORY                                                        TAG                    IMAGE ID       CREATED        SIZE
mcr.microsoft.com/dotnet/sdk                                      7.0                    8cd497c32e47   8 days ago     761MB

Within Visual Studio I have set the Container Tools "Host machine used to run containers" setting to WSL:

image

But I still get errors when trying to build Linux projects (<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>):

image

Finally, the containers window is showing the images I have within Windows

image

Is there another setting I'm missing? Or are my expectations incorrect and this scenario isn't possible?

@NCarlsonMSFT
Copy link
Member

@Andomeda83 The UI on the right for your second screenshot appears to be from the C++ CMake tools not the container tools for .NET.

As tracked in #313 currently only Docker Desktop is supported by the VS container tooling. However, I believe you could use the remote WSL feature of VS Code to be able to do what you are hoping for.

@Andomeda83
Copy link
Author

Thank you for the update @NCarlsonMSFT.

I'm not seeing any reference to C++ CMake in that part of the options. I don't seem to have any C++ tooling selected in "Visual Studio Installer", so how would I confirm this please?

Either way, strangely, if I select that option today, it's different. That dialog does seem to lag so perhaps it didn't refresh. It now shows:

image

The right hand side of the screenshot above is actually from Cross Platform->Dev Containers, but thank you for pointing out #313. At least I now know it's not supported.

Finally, you're right that it works in VSCode. I have this set:

image

Happy to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants