Skip to content

Commit 62a3561

Browse files
Tyler WhitneyTyler Whitney
authored andcommitted
get clearer about topic types (msbuild vs cmake)
1 parent d7e236a commit 62a3561

7 files changed

Lines changed: 33 additions & 35 deletions

docs/linux/cmake-linux-configure.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ Linux support is available in Visual Studio 2017 and later. To see the documenta
1212
::: moniker range=">=vs-2017"
1313
This topic describes how to configure a C++ Linux project, continuing the series that began with [Create a Linux CMake project in Visual Studio](cmake-linux-project.md). If you are using MSBuild, instead, see [Configure a Linux Project in Visual Studio](configure-a-linux-project.md)
1414

15-
## Configure a CMAKE build
15+
## Configure a CMake build for Linux
1616

17-
To configure the build, open the CMake Settings Editor. This creates a **CMakeSettings.json** file at the root of your project. Configurations can be used to target different platforms (Windows, WSL, a remote system) with the same source code. They are also used to set your compilers, pass environment variables, and customize how CMake is invoked.
17+
To configure the build, open the CMake Settings Editor. This creates a *CMakeSettings.json* file at the root of your project. Configurations can be used to target different platforms (Windows, WSL, a remote system) with the same source code. They are also used to set your compilers, pass environment variables, and customize how CMake is invoked.
1818

1919
The *CMakeSettings.json* file in a CMake Linux project specifies some or all of the properties listed in [Customize CMake settings](../build/customize-cmake-settings.md), plus additional properties that control the build settings on the remote Linux machine.
2020
::: moniker-end
2121

2222
::: moniker range="vs-2017"
2323
To change the default CMake settings in Visual Studio 2017, choose **CMake** > **Change CMake Settings** > **CMakeLists.txt** from the main menu. Or, right-click *CMakeSettings.txt* in **Solution Explorer** and choose **Change CMake Settings**. Visual Studio then creates a new *CMakeSettings.json* file in your root project folder. You can open the file using the **CMake Settings** editor or modify the file directly. For more information, see [Customize CMake settings](../build/customize-cmake-settings.md).
2424

25-
Given the following code and CMakeLists.txt file:
25+
Given the following code and *CMakeLists.txt* file:
2626

2727
```cpp
2828
// hello.cpp
@@ -125,7 +125,7 @@ You can use the following optional settings for more control:
125125

126126
These options allow you to run commands on the Linux system before and after building, and before CMake generation. The values can be any command that is valid on the remote system. The output is piped back to Visual Studio.
127127

128-
## Next step
128+
## Next steps
129129

130130
[Debug a CMake Linux project](cmake-linux-debug.md)
131131

docs/linux/cmake-linux-debug.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ When you open a CMake project folder, Visual Studio parses the *CMakeLists.txt*
2424
::: moniker range="vs-2019"
2525
### Windows Subsystem for Linux
2626

27-
If you're targeting Windows Subsystem for Linux (WSL), select **Manage Configurations** in the configuration dropdown in the main toolbar. Then press the **Add Configuration** button and choose **WSL-Debug** or **WSL-Release** if using GCC. Use the Clang variants if using the Clang/LLVM toolset.
27+
To target Windows Subsystem for Linux (WSL), select **Manage Configurations** in the configuration dropdown in the main toolbar. Then press the **Add Configuration** button and choose **WSL-Debug** or **WSL-Release** if using GCC. Use the Clang variants if using the Clang/LLVM toolset.
2828

2929
**Visual Studio 2019 version 16.1** When targeting WSL, no copying of sources or headers is necessary. That's because the compiler on Linux has direct access to your source files in the Windows file system. (In Windows 10 version 1903 and later, Windows applications likewise can access the Linux header files directly. Visual Studio doesn't take advantage of this capability yet.)
3030
::: moniker-end
@@ -46,7 +46,7 @@ After you select a target, CMake runs automatically on the Linux system to gener
4646

4747
### Intellisense
4848

49-
To provide IntelliSense support for headers on remote Linux systems, Visual Studio automatically copies them from the Linux machine to a directory on your local Windows machine. For more information, see [IntelliSense for remote headers](configure-a-linux-project.md#remote_intellisense).
49+
Accurate C++ IntelliSense requires access to the C++ headers that are referenced by C++ source files. Visual Studio automatically copies the headers referenced by a CMake project from Linux to Windows to provide a full-fidelity IntelliSense experience. For more information, see [IntelliSense for remote headers](configure-a-linux-project.md#remote_intellisense).
5050

5151
### Locale
5252

docs/linux/cmake-linux-project.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Also, make sure the following are installed on the remote machine:
2828
- gdb
2929
- rsync
3030
- zip
31-
- ninja-build if you're using Visual Studio 2019 or above
31+
- ninja-build (Visual Studio 2019 or above)
3232
::: moniker-end
3333

3434
::: moniker range="vs-2017"
@@ -59,8 +59,6 @@ Alternatively, you can open your own CMake project in Visual Studio 2019. The fo
5959
::: moniker range=">=vs-2017"
6060
## Open a CMake project folder
6161

62-
You can bring your own CMake project to Visual Studio by opening the folder that contains the `CMakeLists.txt` file.
63-
6462
When you open a folder that contains an existing CMake project, Visual Studio uses variables in the CMake cache to automatically configure IntelliSense and builds. Local configuration and debugging settings get stored in JSON files. You can optionally share these files with others who are using Visual Studio.
6563

6664
Visual Studio doesn't modify the *CMakeLists.txt* files. It's left alone so that others working on the same project can continue to use their existing tools. Visual Studio does regenerate the cache when you save edits to *CMakeLists.txt* or in some cases to *CMakeSettings.json*. But if you're using an **Existing Cache** configuration, then Visual Studio doesn't modify the cache.

docs/linux/configure-a-linux-project.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
2-
title: "Configure a C++ Linux project in Visual Studio"
3-
ms.date: "06/22/2020"
2+
title: "Configure a MSBuild-based C++ Linux project in Visual Studio"
3+
ms.date: "08/04/2020"
44
ms.assetid: 4d7c6adf-54b9-4b23-bd23-5de0c825b768
55
---
6-
# Configure a Linux project
6+
# Configure a MSBuild-based C++ Linux project in Visual Studio
77

88
::: moniker range="vs-2015"
99

1010
Linux support is available in Visual Studio 2017 and later.
1111

1212
::: moniker-end
1313

14-
This topic describes how to configure a C++ Linux project as described in [Create a new C++ Linux project in Visual Studio](create-a-new-linux-project.md). For CMake Linux projects, see [Configure a Linux CMake Project](cmake-linux-project.md).
14+
This topic describes how to configure a C++ Linux project as described in [Create a MSBuild-based C++ Linux project in Visual Studio](create-a-new-linux-project.md). For CMake Linux projects, see [Configure a Linux CMake Project](cmake-linux-project.md).
1515

1616
You can configure a Linux project to target a physical Linux machine, a virtual machine, or the [Windows Subsystem for Linux](/windows/wsl/about) (WSL).
1717

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: "Create a new C++ Linux project in Visual Studio"
3-
ms.date: "10/24/2019"
2+
title: "Create a MSBuild-based C++ Linux project in Visual Studio"
3+
ms.date: "08/04/2020"
44
description: "Create a new MSBuild-based Linux project in Visual Studio."
55
ms.assetid: 5d7c1d67-bc31-4f96-8622-2b4cf91372fd
66
---
7-
# Create a new Linux project
7+
# Create a MSBuild-based C++ Linux project in Visual Studio
88

99
::: moniker range="vs-2015"
1010

@@ -36,7 +36,7 @@ To create a new Linux project in Visual Studio 2017, follow these steps:
3636

3737
## Next steps
3838

39-
[Configure a Linux project](configure-a-linux-project.md)
39+
[Configure a MSBuild-based Linux project](configure-a-linux-project.md)
4040

4141
::: moniker-end
4242

@@ -66,6 +66,6 @@ To create a new Linux project in Visual Studio 2019, follow these steps:
6666

6767
## Next steps
6868

69-
[Configure a Linux project](configure-a-linux-project.md)
69+
[Configure a MSBuild-based Linux project](configure-a-linux-project.md)
7070

7171
::: moniker-end

docs/linux/deploy-run-and-debug-your-linux-project.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
title: "Deploy, run, and debug your C++ Linux project in Visual Studio"
3-
description: "Describes how to compile, execute, and debug code on the remote target from inside a Linux C++ project in Visual Studio."
4-
ms.date: "06/07/2019"
2+
title: "Deploy, run, and debug your MSBuild-based C++ Linux project in Visual Studio"
3+
description: "Describes how to compile, execute, and debug code on the remote target from inside a MSBuild-based Linux C++ project in Visual Studio."
4+
ms.date: "08/04/2020"
55
ms.assetid: f7084cdb-17b1-4960-b522-f84981bea879
66
---
7-
# Deploy, run, and debug your Linux project
7+
# Deploy, run, and debug your MSBuild-based Linux project
88

99
::: moniker range="vs-2015"
1010

1111
Linux support is available in Visual Studio 2017 and later.
1212

1313
::: moniker-end
1414

15-
Once you have created a Linux C++ project in Visual Studio and you have connected to the project using the [Linux Connection Manager](connect-to-your-remote-linux-computer.md), you can run and debug the project. You compile, execute, and debug the code on the remote target.
15+
Once you've created a MSBuild-based Linux C++ project in Visual Studio and you've connected to the project using the [Linux Connection Manager](connect-to-your-remote-linux-computer.md), you can run and debug the project. You compile, execute, and debug the code on the remote target.
1616

1717
::: moniker range="vs-2019"
1818

@@ -46,20 +46,20 @@ There are several ways to interact with and debug your Linux project.
4646

4747
::: moniker-end
4848

49-
- In **gdbserver** mode, GDB is run locally, which connects to gdbserver on the remote system. Note that this is the only mode that the Linux Console window supports.
49+
- In **gdbserver** mode, GDB is run locally, which connects to gdbserver on the remote system. This is the only mode that the Linux Console window supports.
5050

51-
- In **gdb** mode, the Visual Studio debugger drives GDB on the remote system. This is a better option if the local version of GDB is not compatible with the version installed on the target computer. |
51+
- In **gdb** mode, the Visual Studio debugger drives GDB on the remote system. This is a better option if the local version of GDB isn't compatible with the version installed on the target computer. |
5252

5353
> [!NOTE]
5454
> If you are unable to hit breakpoints in gdbserver debugging mode, try gdb mode. gdb must first be [installed](download-install-and-setup-the-linux-development-workload.md) on the remote target.
5555
5656
1. Select the remote target using the standard **Debug** toolbar in Visual Studio.
5757

58-
When the remote target is available, you will see it listed by either name or IP address.
58+
When the remote target is available, you'll see it listed by either name or IP address.
5959

6060
![Remote target](media/remote_target.png)
6161

62-
If you have not yet connected to the remote target, you will see an instruction to use [Linux Connection Manager](connect-to-your-remote-linux-computer.md) to connect to the remote target.
62+
If you haven't connected to the remote target yet, you'll see an instruction to use [Linux Connection Manager](connect-to-your-remote-linux-computer.md) to connect to the remote target.
6363

6464
![Remote Architecture](media/architecture.png)
6565

@@ -81,7 +81,7 @@ There are several ways to interact with and debug your Linux project.
8181

8282
![Linux Console menu](media/consolemenu.png)
8383

84-
This console will display any console output from the target computer as well as take input and send it to the target computer.
84+
This console will display any console output from the target computer and take input and send it to the target computer.
8585

8686
![Linux Console window](media/consolewindow.png)
8787

@@ -118,13 +118,13 @@ ExePath="C:\temp\ConsoleApplication17\ConsoleApplication17\bin\x64\Debug\Console
118118
</SupplementalLaunchOptions>
119119
```
120120

121-
The **AttachOptionsForConnection** has most of the attributes you might need. The example above shows how to specify a location to search for additional .so libraries. The child element **ServerOptions** enables attaching to the remote process with gdbserver instead. To do that you need to specify a local gdb client (the one shipped in Visual Studio 2017 is shown above) and a local copy of the binary with symbols. The **SetupCommands** element enables you to pass commands directly to gdb. You can find all the options available in the [LaunchOptions.xsd schema](https://github.com/Microsoft/MIEngine/blob/master/src/MICore/LaunchOptions.xsd) on GitHub.
121+
The **AttachOptionsForConnection** has most of the attributes you might need. The example above shows how to specify a location to search for additional .so libraries. The child element **ServerOptions** enables attaching to the remote process with gdbserver instead. To do that, you need to specify a local gdb client (the one shipped in Visual Studio 2017 is shown above) and a local copy of the binary with symbols. The **SetupCommands** element enables you to pass commands directly to gdb. You can find all the options available in the [LaunchOptions.xsd schema](https://github.com/Microsoft/MIEngine/blob/master/src/MICore/LaunchOptions.xsd) on GitHub.
122122

123123
::: moniker range="vs-2019"
124124

125125
## <a name="separate_build_debug"></a> Specify different machines for building and debugging
126126

127-
In Visual Studio 2019 version 16.1 You can separate your remote build machine from your remote debug machine for both MSBuild-based Linux projects and CMake projects that target a remote Linux machine. For example, you can now cross-compile on x64 and deploy to an ARM device when targeting IoT scenarios.
127+
In Visual Studio 2019 version 16.1, you can separate your remote build machine from your remote debug machine for both MSBuild-based Linux projects and CMake projects that target a remote Linux machine. For example, you can now cross-compile on x64 and deploy to an ARM device when targeting IoT scenarios.
128128

129129
### MSBuild-based projects
130130

@@ -134,13 +134,13 @@ By default, the remote debug machine is the same as the remote build machine (**
134134

135135
The drop-down menu for **Remote Debug Machine** is populated with all established remote connections. To add a new remote connection, navigate to **Tools** > **Options** > **Cross Platform** > **Connection Manager** or search for "Connection Manager" in **Quick Launch**. You can also specify a new remote deploy directory in the project's Property Pages (**Configuration Properties** > **General** > **Remote Deploy Directory**).
136136

137-
By default, only the files necessary for the process to debug will be deployed to the remote debug machine. You can use **Solution Explorer** to configure which source files will be deployed to the remote debug machine. When you click on a source file, you will see a preview of its File Properties directly below the Solution Explorer.
137+
By default, only the files necessary for the process to debug will be deployed to the remote debug machine. You can use **Solution Explorer** to configure which source files will be deployed to the remote debug machine. When you click on a source file, you'll see a preview of its File Properties directly below the Solution Explorer.
138138

139139
![Linux deployable files](media/linux-deployable-content.png)
140140

141141
The **Content** property specifies whether the file will be deployed to the remote debug machine. You can disable deployment entirely by navigating to **Property Pages** > **Configuration Manager** and unchecking **Deploy** for the desired configuration.
142142

143-
In some cases, you may require more control over your project's deployment. For example, some files that you want to deploy might be outside of your solution or you want to customize your remote deploy directory per file ordirectory. In these cases, append the following code block(s) to your .vcxproj file and replace "example.cpp" with the actual file names:
143+
In some cases, you may require more control over your project's deployment. For example, some files that you want to deploy might be outside of your solution or you want to customize your remote deploy directory per file or directory. In these cases, append the following code block(s) to your .vcxproj file and replace "example.cpp" with the actual file names:
144144

145145
```xml
146146

docs/linux/toc.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
href: ../linux/connectionmanager-reference.md
1313
- name: Build Linux projects with MSBuild in Visual Studio
1414
items:
15-
- name: Create a new Linux project
15+
- name: Create a MSBuild-based Linux project
1616
href: ../linux/create-a-new-linux-project.md
17-
- name: Configure a Linux project
17+
- name: Configure a MSBuild-based Linux project
1818
href: ../linux/configure-a-linux-project.md
19-
- name: Deploy, run, and debug your Linux project
19+
- name: Deploy, run, and debug your MSBuild-based Linux project
2020
href: ../linux/deploy-run-and-debug-your-linux-project.md
2121
- name: Linux Project Property Page reference
2222
items:

0 commit comments

Comments
 (0)