I'm trying to remote build a C++ helloworld in VisualStudio2017 on WSL Ubuntu. I followed the instructions as outlined by Goodner on MSDN here:

https://blogs.msdn.microsoft.com/vcblog/2016/03/30/visual-c-for-linux-development/ https://blogs.msdn.microsoft.com/vcblog/2017/04/11/linux-development-with-c-in-visual-studio/ https://blogs.msdn.microsoft.com/vcblog/2018/11/26/using-visual-studio-for-cross-platform-c-development-targeting-windows-and-linux/

And for WSL this: https://docs.microsoft.com/en-us/windows/wsl/install-on-server

Problem: Intellisense can't find the include headers and I cannot debug my program. The build on the Linux however is successful and can be run from the bash.

I figured the Remote Headers IntelliSense Manager should have been able to resolve the issue, but it's not downloading the headers to my Windows header cache

Any help on how to correctly set up VS2017 remote build/debug on WSL to build C, C++ and existing Make projects is highly appreciated.


I use the actual headers from the WSL linux instance as includes for my VisualStudio project. It is ok to READ them.. just don't EVER edit them from Windows.

Here is a crumb to get you started: $(UserProfile)\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\LocalState\rootfs\usr\include

This also gives me a guarentee that the code being compiled is the same as the one being used by intellisense.

One other tip.. I don't actually use that HURKING LONG PATH.. I junction it elsewhere and use the shorter path.. This also makes it easy to switch distros without changing my project files over and over.

Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.