Skip to content

Commit 10457ca

Browse files
author
mikeblome
committed
fixed monikers and version-specific wording
1 parent e0d57f0 commit 10457ca

File tree

1 file changed

+34
-19
lines changed

1 file changed

+34
-19
lines changed

docs/linux/create-a-new-linux-project.md

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,50 @@ Linux projects are available in Visual Studio 2017 and later.
1212

1313
::: moniker-end
1414

15-
First, make sure you have the **Linux Development Workload** for Visual Studio installed. For more information, see [Download, install, and setup the Linux workload](download-install-and-setup-the-linux-development-workload.md).
15+
::: moniker range="vs-2017"
1616

17-
When you create a new C++ project for Linux in Visual Studio, you can choose to create a Visual Studio project or a CMake project. This article describes how to create a Visual Studio project. In general, for new projects that might include open-source code or that you intend to compile for cross-platform development, we recommend that you use CMake with Visual Studio. With a CMake project you can build and debug the same project on both Windows and Linux. For more information, see [Create and configure a Linux CMake Project](cmake-linux-project.md).
17+
First, make sure you have the **Linux Development Workload** for Visual Studio installed. For more information, see [Download, install, and setup the Linux workload](download-install-and-setup-the-linux-development-workload.md).
1818

19-
If you have an existing Windows Visual Studio solution that you would like to extend to compile for Linux, and CMake is not an option, then you can add a Visual Studio Linux project to the Windows solution, along with a **Shared Items** project. 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.
19+
For cross-platform compilation, we recommend using CMake. CMake support is more complete in Visual Studio 2019. If CMake is not 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. 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.
2020

2121
## To create a new Linux project
2222

23-
To create a new Linux project in Visual Studio, follow these steps:
24-
25-
::: moniker range="vs-2019"
23+
To create a new Linux project in Visual Studio 2017, follow these steps:
2624

2725
1. Select **File > New Project** in Visual Studio, or press **Ctrl + Shift + N**.
28-
1. Set the **Language** to **C++** and search for "Linux". Select the project type to create, and then choose **Next**. Enter a **Name** and **Location**, and choose **Create**.
26+
1. Select the **Visual C++ > Cross Platform > Linux** node, and then select the project type to create. Enter a **Name** and **Location**, and choose **OK**.
2927

30-
![New Linux Project](media/newproject-vs2019.png)
28+
![New Linux Project](media/newproject.png)
29+
30+
| Project Type | Description |
31+
| ------------ | --- |
32+
| **Blink (Raspberry)** | Project targeted for a Raspberry Pi device, with sample code that blinks an LED |
33+
| **Console Application (Linux)** | Project targeted for any Linux computer, with sample code that outputs text to the console |
34+
| **Empty Project (Linux)** | Project targeted for any Linux computer, with no sample code |
35+
| **Makefile Project (Linux)** | Project targeted for any Linux computer, built using a standard Makefile build system |
36+
37+
## Next steps
38+
39+
[Configure a Linux project](configure-a-linux-project.md)
3140

3241
::: moniker-end
3342

34-
::: moniker range="vs-2017"
43+
::: moniker range="vs-2019"
3544

36-
1. Select **File > New Project** in Visual Studio, or press **Ctrl + Shift + N**.
37-
1. Select the **Visual C++ > Cross Platform > Linux** node, and then select the project type to create. Enter a **Name** and **Location**, and choose **OK**.
45+
First, make sure you have the **Linux Development Workload** for Visual Studio installed. For more information, see [Download, install, and setup the Linux workload](download-install-and-setup-the-linux-development-workload.md).
3846

39-
![New Linux Project](media/newproject.png)
47+
When you create a new C++ project for Linux in Visual Studio, you can choose to create a Visual Studio project or a CMake project. This article describes how to create a Visual Studio project. In general, for new projects that might include open-source code or that you intend to compile for cross-platform development, we recommend that you use CMake with Visual Studio. With a CMake project you can build and debug the same project on both Windows and Linux. For more information, see [Create and configure a Linux CMake Project](cmake-linux-project.md).
4048

41-
::: moniker-end
49+
If you have an existing Windows Visual Studio solution that you would like to extend to compile for Linux, and CMake is not an option, then you can add a Visual Studio Linux project to the Windows solution, along with a **Shared Items** project. 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.
50+
51+
## To create a new Linux project
52+
53+
To create a new Linux project in Visual Studio 2019, follow these steps:
54+
55+
1. Select **File > New Project** in Visual Studio, or press **Ctrl + Shift + N**.
56+
1. Set the **Language** to **C++** and search for "Linux". Select the project type to create, and then choose **Next**. Enter a **Name** and **Location**, and choose **Create**.
57+
58+
![New Linux Project](media/newproject-vs2019.png)
4259

4360
| Project Type | Description |
4461
| ------------ | --- |
@@ -47,12 +64,10 @@ To create a new Linux project in Visual Studio, follow these steps:
4764
| **Empty Project (Linux)** | Project targeted for any Linux computer, with no sample code |
4865
| **Makefile Project (Linux)** | Project targeted for any Linux computer, built using a standard Makefile build system |
4966

50-
::: moniker range="vs-2019"
67+
## Next steps
5168

52-
Visual Studio 2019 enables you to create a new CMake project. For more information, see [Create and configure a Linux CMake Project ](cmake-linux-project.md).
53-
54-
::: moniker-end
69+
[Configure a Linux project](configure-a-linux-project.md)
70+
71+
::: moniker-end
5572

56-
## Next Steps
5773

58-
[Configure a Linux project](configure-a-linux-project.md)

0 commit comments

Comments
 (0)