Skip to content

Commit febea03

Browse files
author
Colin Robertson
authored
Merge pull request MicrosoftDocs#1606 from esweet431/patch-12
Update required dependencies + small edits
2 parents a20eed2 + 567605e commit febea03

File tree

1 file changed

+39
-16
lines changed

1 file changed

+39
-16
lines changed

docs/linux/download-install-and-setup-the-linux-development-workload.md

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,14 @@ Linux projects are supported in Visual Studio 2017 and later.
1515

1616
::: moniker range=">=vs-2017"
1717

18-
You can use the Visual Studio IDE in Windows to create, edit and debug C++ projects that execute on a Linux physical computer, virtual machine, or the [Windows Subsystem for Linux](/windows/wsl/about).
18+
You can use the Visual Studio IDE on Windows to create, edit and debug C++ projects that execute on a remote Linux system, virtual machine, or the [Windows Subsystem for Linux](/windows/wsl/about).
1919

20-
You can work on your existing code base that uses CMake or any other build system without having to convert it to a Visual Studio project. If your code base is cross-platform, you can target both Windows and Linux from within Visual Studio. For example, you can edit, debug and profile your code on Windows using Visual Studio, then quickly retarget the project for Linux to do further testing. The Linux header files are automatically copied to your local machine where Visual Studio uses them to provide full IntelliSense support (Statement Completion, Go to Definition, and so on).
20+
You can work on your existing code base that uses CMake without having to convert it to a Visual Studio project. If your code base is cross-platform, you can target both Windows and Linux from within Visual Studio. For example, you can edit, build, and debug your code on Windows using Visual Studio, then quickly retarget the project for Linux to build and debug in a Linux environment. Linux header files are automatically copied to your local machine, where Visual Studio uses them to provide full IntelliSense support (Statement Completion, Go to Definition, and so on).
2121

2222
For any of these scenarios, the **Linux development with C++** workload is required.
2323

2424
::: moniker-end
2525

26-
::: moniker range="vs-2019"
27-
28-
In Visual Studio 2019 you can specify separate targets for building and debugging. When targeting WSL, it is no longer necessary to add a remote connection or configure SSH.
29-
30-
::: moniker-end
31-
3226
::: moniker range=">=vs-2017"
3327

3428
## Visual Studio setup
@@ -41,39 +35,66 @@ In Visual Studio 2019 you can specify separate targets for building and debuggin
4135

4236
![Visual C++ for Linux Development workload](media/linuxworkload.png)
4337

44-
1. If you are targeting IoT or embedded platforms, go to the **Installation details** pane on the right, under **Linux development with C++**, expand **Optional Components** and choose the components you need. CMake support for Linux is selected by default.
38+
1. If you are targeting IoT or embedded platforms, go to the **Installation details** pane on the right. Under **Linux development with C++**, expand **Optional Components**, and choose the components you need. CMake support for Linux is selected by default.
4539

4640
1. Click **Modify** to continue with the installation.
4741

4842
## Options for creating a Linux environment
4943

5044
If you don't already have a Linux machine, you can create a Linux Virtual Machine on Azure. For more information, see [Quickstart: Create a Linux virtual machine in the Azure portal](/azure/virtual-machines/linux/quick-create-portal).
5145

52-
On Windows 10, you can install and target your favorite Linux distro on the Windows Subsystem for Linux (WSL). For more information, see [Windows Subsystem for Linux Installation Guide for Windows 10](/windows/wsl/install-win10). WSL is a convenient console environment but is not recommended for graphical applications.
46+
On Windows 10, you can install and target your favorite Linux distro on the Windows Subsystem for Linux (WSL). For more information, see [Windows Subsystem for Linux Installation Guide for Windows 10](/windows/wsl/install-win10). WSL is a convenient console environment, but is not recommended for graphical applications.
5347

5448
::: moniker-end
5549

5650
::: moniker range="vs-2019"
5751

52+
Linux projects in Visual Studio require the following dependencies to be installed on your remote Linux system or WSL:
53+
- **A compiler** - Visual Studio 2019 has out-of-the-box support for GCC and [Clang](https://docs.microsoft.com/en-us/cpp/build/clang-support-cmake?view=vs-2019).
54+
- **gdb** - Visual Studio automatically launches gdb on the Linux system, and uses the front-end of the Visual Studio debugger to provide a full-fidelity debugging experience on Linux.
55+
- **rsync** and **zip** - the inclusion of rsync and zip allows Visual Studio to extract header files from your Linux system to the Windows filesystem for use by IntelliSense.
56+
- **make**
57+
- **openssh-server** (remote Linux systems only) - Visual Studio connects to remote Linux systems over a secure SSH connection.
58+
- **CMake** (CMake projects only) - You can install Microsoft's [statically linked CMake binaries for Linux](https://github.com/microsoft/CMake/releases).
59+
60+
The following commands assume you are using g++ instead of clang.
61+
62+
::: moniker-end
63+
64+
::: moniker range="vs-2017"
65+
66+
Linux projects in Visual Studio require the following dependencies to be installed on your remote Linux system or WSL:
67+
- **gcc** - Visual Studio 2017 has out-of-the-box support for GCC.
68+
- **gdb** - Visual Studio automatically launches gdb on the Linux system and uses the front-end of the Visual Studio debugger to provide a full-fidelity debugging experience on Linux.
69+
- **rsync** and **zip** - the inclusion of rsync and zip allows Visual Studio to extract header files from your Linux system to the Windows filesystem to use for IntelliSense.
70+
- **make**
71+
- **openssh-server** - Visual Studio connects to remote Linux systems over a secure SSH connection.
72+
- **CMake** (CMake projects only) - You can install Microsoft's [statically linked CMake binaries for Linux](https://github.com/microsoft/CMake/releases).
73+
74+
::: moniker-end
75+
76+
::: moniker range="vs-2019"
77+
5878
## Linux setup: Ubuntu on WSL
5979

6080
When you are targeting WSL, there is no need to add a remote connection or configure SSH in order to build and debug. **zip** and **rsync** are required for automatic syncing of Linux headers with Visual Studio for Intellisense support. If the required applications are not already present, you can install them as follows:
6181

6282
```bash
6383
sudo apt-get install g++ gdb make rsync zip
6484
```
85+
6586
::: moniker-end
6687

6788
::: moniker range=">=vs-2017"
6889

6990
## Ubuntu on remote Linux systems
7091

71-
The target Linux system must have **openssh-server**, **g++**, **gdb**, and **gdbserver** installed, and the ssh daemon must be running. **zip** is required for automatic syncing of remote headers with your local machine for Intellisense support. If these applications are not already present, you can install them as follows:
92+
The target Linux system must have **openssh-server**, **g++**, **gdb**, and **make** installed, and the ssh daemon must be running. **zip** and **rsync** are required for automatic syncing of remote headers with your local machine for Intellisense support. If these applications are not already present, you can install them as follows:
7293

7394
1. At a shell prompt on your Linux computer, run:
7495

7596
```bash
76-
sudo apt-get install openssh-server g++ gdb gdbserver zip
97+
sudo apt-get install openssh-server g++ gdb make rsync zip
7798
```
7899

79100
You may be prompted for your root password due to the sudo command. If so, enter it and continue. Once complete, the required services and tools are installed.
@@ -83,6 +104,7 @@ The target Linux system must have **openssh-server**, **g++**, **gdb**, and **gd
83104
```bash
84105
sudo service ssh start
85106
```
107+
86108
This starts the service and runs it in the background, ready to accept connections.
87109

88110
::: moniker-end
@@ -91,10 +113,10 @@ The target Linux system must have **openssh-server**, **g++**, **gdb**, and **gd
91113

92114
## Fedora on WSL
93115

94-
Fedora uses the **dnf** package installer. To download **g++**, **gdb**, **rsync** and **zip**, run:
116+
Fedora uses the **dnf** package installer. To download **g++**, **gdb**, **make**, **rsync** and **zip**, run:
95117

96118
```bash
97-
sudo dnf install gcc-g++ gdb rsync zip
119+
sudo dnf install gcc-g++ gdb rsync make zip
98120
```
99121

100122
**zip** and **rsync** are required for automatic syncing of Linux headers with Visual Studio for Intellisense support.
@@ -105,13 +127,14 @@ Fedora uses the **dnf** package installer. To download **g++**, **gdb**, **rsync
105127

106128
## Fedora on remote Linux systems
107129

108-
The target machine running Fedora uses the **dnf** package installer. To download **openssh-server**, **g++**, **gdb**, **gdbserver** and **zip**, and restart the ssh daemon, follow these instructions:
130+
The target machine running Fedora uses the **dnf** package installer. To download **openssh-server**, **g++**, **gdb**, **make**, **rsync**, and **zip**, and restart the ssh daemon, follow these instructions:
109131

110132
1. At a shell prompt on your Linux computer, run:
111133

112134
```bash
113-
sudo dnf install openssh-server gcc-g++ gdb gdb-gdbserver zip
135+
sudo dnf install openssh-server gcc-g++ gdb make rsync zip
114136
```
137+
115138
You may be prompted for your root password due to the sudo command. If so, enter it and continue. Once complete, the required services and tools are installed.
116139

117140
1. Ensure the ssh service is running on your Linux computer by running:

0 commit comments

Comments
 (0)