
Enter a Name and Location, and choose OK.
Select the Visual C++ > Cross Platform > Linux node, and then select the project type to create. Select File > New Project in Visual Studio, or press Ctrl + Shift + N. To create a new Linux project in Visual Studio 2017, follow these steps: Put the code that is shared between both platforms in the Shared Items project, and add a reference to that project from the Windows and Linux projects. If CMake isn't an option, and you have an existing Windows Visual Studio solution that you would like to extend to compile for Linux, you can add a Visual Studio Linux project to the Windows solution, along with a Shared Items project. CMake support is more complete in Visual Studio 2019.
For more information, see Download, install, and setup the Linux workload.įor cross-platform compilation, we recommend using CMake. First, make sure you have the Linux Development Workload for Visual Studio installed.