
Select the toolset that matches your compilers and Linux environment and press OK. There are four platform toolsets to choose from: GCC for Remote Linux, Clang for Remote Linux, GCC for Windows Subsystem for Linux, and Clang for Windows Subsystem for Linux. Right-click on the project in the Solution Explorer and select Properties. We will first select the project’s platform toolset. This project will open a readme with some instructions about its capabilities. To create a new MSBuild-based Linux Console Application in Visual Studio, filter the language to C++, the platform to Linux, and select “Console Application”. Learn more about options for creating a Linux environment in our documentation. Start SSH with the following command: sudo service start ssh

Sudo apt install -y build-essential gdb rsync zip openssh-server In a Debian-based Linux environment, this is as easy as: sudo apt update You can use any Linux distribution that has SSH, gdb, rsync, zip, and a compiler (clang or GCC) installed. You will need a Linux machine, or you can use the Windows Subsystem for Linux. Learn more about installing the Linux development with C++ workload in our documentation. The workload installs in under 10 minutes. Under the section “Other Toolsets” you will find Linux Development with C++. To install it, start the Visual Studio installer and choose to either install or modify an existing installation. Visual Studio 20 include the C/C++ Linux Development workload. Install Workload for Linux development with C++ If you are new to using Visual Studio for C++ development, a great starting point is our guide to Getting Started with Visual Studio. How to use Visual Studio diagnostic tools to find and resolve issues.What capabilities the Linux project system provides, and.

How sources are managed between Visual Studio and Linux,.How to establish your first connection to a Linux machine from Visual Studio,.How to create a MSBuild-based Linux C++ project,.How to acquire the Linux Development with C++ workload,.If you are looking to target both Windows and Linux with the same project, our recommendation is to use CMake. This post describes how to use Visual Studio’s MSBuild-based support to build and debug on a remote Linux system with Visual Studio 2019. You can learn more about CMake projects in our documentation and on our C++ Team Blog. Visual Studio’s CMake support allows you to target multiple platforms (Windows, a remote Linux system, the Windows Subsystem for Linux, embedded targets…) with a single CMake project.

We generally recommend Visual Studio’s native support for CMake for all C++ Linux development. Visual Studio 2017 introduced the Linux Development with C++ workload. For up-to-date documentation see Linux development with C++.įor an overview of the Visual Studio capabilities described in this article, see Develop C and C++ applications.This post was updated on December 11, 2020
