Hi JohnEmmas-0498,
I follow this instructions with visual studio community 2019 and Debian. There are also some compilation errors on my side, maybe you could try these steps which can work for me:
Cmake project:
- Install Ninja on debian, the command: apt-get install ninja-build
Linux console application:
- In the project property page, select GCC for Windows Subsystem for Linux instead of GCC for Remote Linux
After that, the application can compile and debug normally.
If these steps doesn't work, could you please provide some details about your compilation error?
[Update]
The configuration of msbuild project is different from cmake.
From first document, you don't need to add connection in Connection Manager. You just need to right-click project in solution explorer, then switch the platform Toolset to GCC for Windows Subsystem for Linux.
And according to your latest updates, you could follow this document:Configure a Linux MSBuild C++ project in Visual Studio to configure your linux msbuild project, and then build, debug, run it on remote linux system.
I'm using the name and port number shown in the instructions and I've tried various different user names and passwords.
You can try to use ip address instead of 'localhost'.
[Edit...] A bit more info... I can't claim to understand this but I found a command online:- ssh -L1234:localhost:22 localhost and if I issue it from bash it gives me this error:- ssh: connect to host localhost port 22: Connection refused
You can run these commands in linux system, which will enable ssh feature:
sudo apt-get install openssh-client
sudo apt-get install nano
sudo service ssh restart
sudo service ssh status
ssh localhost
Now I just need to figure out where it puts the built files...
You could check this directory in property page.
Update:
Intellisense is the only thing I still need to set up (for the Linux compilers). I did read something about it somewhere so I'll just need to find it again....
Maybe this document is what you find: Improvements to Accuracy and Performance of Linux IntelliSense
It doesn't seem possible yet to switch between the two platforms in just a single project.
Yes, the linux project just works in linux system. If you want to remote debug normal msbuild project in remote windows system, you could read Remote Debugging a C++ Project in Visual Studio
Best Regards,
Dylan