You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added a section on "required dependencies" before the distro-specific commands to inform customers why each dependency is required, to specify that Clang is available (instead of GCC) in 2019, and to link to our statically linked CMake binaries for Linux. I also made a few edits to the first few sections:
- removed mention of profiling b/c not all profiling tools work in Open Folder
- removed some of the "what's new in 2019 content" that doesn't have to do with installing the workload or getting started - this page is linked to from Overview Pages and I think it may provide unnecessary complexity
- I also added rsync as a dependency for remote systems
Copy file name to clipboardExpand all lines: docs/linux/download-install-and-setup-the-linux-development-workload.md
+35-14Lines changed: 35 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,20 +15,14 @@ Linux projects are supported in Visual Studio 2017 and later.
15
15
16
16
::: moniker range=">=vs-2017"
17
17
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).
19
19
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).
21
21
22
22
For any of these scenarios, the **Linux development with C++** workload is required.
23
23
24
24
::: moniker-end
25
25
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
-
32
26
::: moniker range=">=vs-2017"
33
27
34
28
## Visual Studio setup
@@ -55,25 +49,52 @@ On Windows 10, you can install and target your favorite Linux distro on the Wind
55
49
56
50
::: moniker range="vs-2019"
57
51
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 to use for 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
+
58
78
## Linux setup: Ubuntu on WSL
59
79
60
80
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:
61
81
62
82
```bash
63
83
sudo apt-get install g++ gdb make rsync zip
64
84
```
85
+
65
86
::: moniker-end
66
87
67
88
::: moniker range=">=vs-2017"
68
89
69
90
## Ubuntu on remote Linux systems
70
91
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:
72
93
73
94
1. At a shell prompt on your Linux computer, run:
74
95
75
96
```bash
76
-
sudo apt-get install openssh-server g++ gdb gdbserver zip
97
+
sudo apt-get install openssh-server g++ gdb make rsync zip
77
98
```
78
99
79
100
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.
@@ -91,10 +112,10 @@ The target Linux system must have **openssh-server**, **g++**, **gdb**, and **gd
91
112
92
113
## Fedora on WSL
93
114
94
-
Fedora uses the **dnf** package installer. To download **g++**, **gdb**, **rsync** and **zip**, run:
115
+
Fedora uses the **dnf** package installer. To download **g++**, **gdb**, **make**, **rsync** and **zip**, run:
95
116
96
117
```bash
97
-
sudo dnf install gcc-g++ gdb rsync zip
118
+
sudo dnf install gcc-g++ gdb rsync make zip
98
119
```
99
120
100
121
**zip** and **rsync** are required for automatic syncing of Linux headers with Visual Studio for Intellisense support.
@@ -105,12 +126,12 @@ Fedora uses the **dnf** package installer. To download **g++**, **gdb**, **rsync
105
126
106
127
## Fedora on remote Linux systems
107
128
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:
129
+
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:
109
130
110
131
1. At a shell prompt on your Linux computer, run:
111
132
112
133
```bash
113
-
sudo dnf install openssh-server gcc-g++ gdb gdb-gdbserver zip
134
+
sudo dnf install openssh-server gcc-g++ gdb make rsync zip
114
135
```
115
136
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.
0 commit comments