Configure Visual C++ 2019 for Linux Development
This focuses mainly on the development of Linux server apps. This article is based on Microsoft's docs.
Visual Studio 2019
Open Visual Studio 2019 and choose to create a new project. Search for Linux projects and choose Console Application with the "hello" example.
Choose your project's architecture.
Install prerequisite packages on the Linux machine: openssh server, g++, gdb and gdb server
On Ubuntu, issue this command:
sudo apt-get install openssh-server g++ gdb gdbserver make ninja-build rsync zip
On Fedora/CentOS, be logged in as user root and issue this command:
yum install openssh-server g++ gdb gdb-gdbserver ninja-build make rsync zip
Hit the F5 key and the project will try to connect to a remote system. Enter the host machine's IP address, user name and password.
To add another connection/remote machine, go to Tools > Options and search for Connection Manager.
To change the connection/remote machine the project is using, go to the project's properties and change Remote Build Machine.
Choose the project's configuration type: Dynamic Library, Static Library or Application (in this example, Application).
Hitting the F5 key should run the application on the host machine and show the output in the Linux Console Window (at the bottom of the screen). Breakpoints can be set for the debugger.
Microsoft's docs recommend changing more settings but these seem to be out of date because these recommendations break the entire process.