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
Copy file name to clipboardExpand all lines: docs/build/cmakesettings-reference.md
+12-4Lines changed: 12 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
---
2
2
title: "CMakeSettings.json schema reference"
3
-
ms.date: "04/25/2019"
3
+
ms.date: "05/16/2019"
4
4
helpviewer_keywords: ["CMake in Visual C++"]
5
5
ms.assetid: 444d50df-215e-4d31-933a-b41841f186f8
6
6
---
7
7
# CMakeSettings.json schema reference
8
8
9
-
The **cmakesettings.json**` file contains information that specifies how Visual Studio should interact with CMake to build a project for a specified platform. The file stores information such as environment variables or arguments for the cmake.exe environment. You can edit directly or use the **CMake Settings editor**. See [Customize CMake build settings in Visual Studio](customize-cmake-settings.md) for more information about the editor.
9
+
The **cmakesettings.json**` file contains information that specifies how Visual Studio should interact with CMake to build a project for a specified platform. The file stores information such as environment variables or arguments for the cmake.exe environment. You can edit directly or use the **CMake Settings editor** (Visuasl Studio 2019 and later). See [Customize CMake build settings in Visual Studio](customize-cmake-settings.md) for more information about the editor.
10
10
11
11
## Environments
12
12
@@ -21,7 +21,7 @@ The `environments` array contains a list of `items` of type `object` which defin
21
21
"inheritEnvironments": [ "msvc_x64_x64" ]
22
22
```
23
23
24
-
The example above is the same as running the **Developer Command Prompt for VS 2017** with the **-arch=amd64 -host_arch=amd64** arguments. Any custom environment can be used, or these predefined environments:
24
+
The example above is the same as running the **Developer Command Prompt for VS 2017**or **Developer Command Prompt for VS 2019**with the **-arch=amd64 -host_arch=amd64** arguments. Any custom environment can be used, or these predefined environments:
25
25
26
26
- linux_arm: Target ARM Linux remotely.
27
27
- linux_x64: Target x64 Linux remotely.
@@ -43,7 +43,13 @@ A `configuration` has these properties:
43
43
-`name`: names the configuration.
44
44
-`description`: description of this configuration that will appear in menus.
45
45
-`generator`: specifies CMake generator to use for this configuration. May be one of:
46
+
47
+
**Visual Studio 2019 only:**
48
+
- Visual Studio 16 2019
49
+
- Visual Studio 16 2019 Win64
50
+
- Visual Studio 16 2019 ARM
46
51
52
+
**Visual Studio 2017 and later:**
47
53
- Visual Studio 15 2017
48
54
- Visual Studio 15 2017 Win64
49
55
- Visual Studio 15 2017 ARM
@@ -55,7 +61,9 @@ A `configuration` has these properties:
55
61
56
62
Because Ninja is designed for fast build speeds instead of flexibility and function, it is set as the default. However, some CMake projects may be unable to correctly build using Ninja. If this occurs, you can instruct CMake to generate a Visual Studio project instead.
57
63
58
-
To specify a Visual Studio generator, open the `CMakeSettings.json` from the main menu by choosing **CMake | Change CMake Settings**. Delete “Ninja” and type “V”. This activates IntelliSense, which enables you to choose the generator you want.
64
+
To specify a Visual Studio generator in Visual Studio 2017, open the `CMakeSettings.json` from the main menu by choosing **CMake | Change CMake Settings**. Delete “Ninja” and type “V”. This activates IntelliSense, which enables you to choose the generator you want.
65
+
66
+
To specify a Visual Studio generator in Visual Studio 2019, right-click on the CMakeLists.txt file in **Solution Explorer** and choose **CMake Settings for project** > **Show Advanced Settings** > **Cmake Generator**.
59
67
60
68
When the active configuration specifies a Visual Studio generator, by default MSBuild.exe is invoked with `-m -v:minimal` arguments. To customize the build, inside the `CMakeSettings.json` file, you can specify additional [MSBuild command line arguments](../build/reference/msbuild-visual-cpp-overview.md) to be passed to the build system via the `buildCommandArgs` property:
Copy file name to clipboardExpand all lines: docs/build/configuring-programs-for-windows-xp.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,14 @@
1
1
---
2
2
title: "Configuring Programs for Windows XP"
3
-
ms.date: "02/02/2018"
3
+
ms.date: "05/16/2019"
4
4
ms.assetid: 1e4487b3-d815-4123-878b-5718b22f0fd5
5
5
---
6
6
# Configuring Programs for Windows XP
7
7
8
8
Because Visual Studio supports multiple platform toolsets, you can target operating systems and runtime libraries that are not supported by the default toolset. For example, by switching the platform toolset, you can use the C++11, C++14, and C++17 language enhancements supported by the MSVC compiler in Visual Studio to create apps that target Windows XP and Windows Server 2003. You can also use older platform toolsets to maintain binary-compatible legacy code and still take advantage of the latest features of the Visual Studio IDE.
9
9
10
+
Visual Studio 2019 and later does not include support for creating code for Windows XP by using the v142 toolset. Support for Windows XP development by using the v141 toolset that shipped in Visual Studio 2017 is available as an optional component in the Visual Studio Installer.
11
+
10
12
## Install the Windows XP platform toolset
11
13
12
14
To get the platform toolset and components to target Windows XP and Windows Server 2003 in Visual Studio 2017, run the Visual Studio Installer. When you initially install Visual Studio or when you choose **Modify** to modify an existing installation, make sure that the **Desktop development with C++** workload is selected. In the list of optional components for this workload, choose **Windows XP support for C++**, and then choose **Install** or **Modify**.
Copy file name to clipboardExpand all lines: docs/build/cppproperties-schema-reference.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: "CppProperties.json schema reference"
3
-
ms.date: "03/21/2019"
3
+
ms.date: "05/16/2019"
4
4
helpviewer_keywords: ["CMake in Visual Studio"]
5
5
---
6
6
@@ -258,7 +258,7 @@ You have access to the following built-in macros inside `CppProperties.json`:
258
258
|-|-|
259
259
|`${workspaceRoot}`| the full path to the workspace folder|
260
260
|`${projectRoot}`| the full path to the folder where `CppProperties.json` is placed|
261
-
|`${vsInstallDir}`| the full path to the folder where the running instance of VS 2017 is installed|
261
+
|`${vsInstallDir}`| the full path to the folder where the running instance of Visual Studio is installed|
262
262
263
263
For example, if your project has an include folder and also includes windows.h and other common headers from the Windows SDK, you may want to update your `CppProperties.json` configuration file with these includes:
264
264
@@ -283,7 +283,7 @@ For example, if your project has an include folder and also includes windows.h a
283
283
```
284
284
285
285
> [!Note]
286
-
> `%WindowsSdkDir%` and `%VCToolsInstallDir%` are not set as global environment variables so make sure you start devenv.exe from a "Developer Command Prompt for VS 2017" that defines these variables.
286
+
> `%WindowsSdkDir%` and `%VCToolsInstallDir%` are not set as global environment variables so make sure you start devenv.exe from a Developer Command Prompt that defines these variables. (Type "developer" in the Windows Start Menu.)
@@ -17,7 +17,7 @@ When you install a C++ workload in the Visual Studio installer, it always instal
17
17
18
18
## Use a 64-bit hosted developer command prompt shortcut
19
19
20
-
When Visual Studio is installed on a 64-bit Windows operating system, additional developer command prompt shortcuts for the 64-bit, x64-hosted native and cross compilers are available. To access these command prompts on Windows 10, on the **Start** menu, open the folder for your version of Visual Studio, for example **Visual Studio 2017**, and then choose one of the x64 native or cross-tool developer command prompts. To access these command prompts on Windows 8, on the **Start** screen, open **All apps**. Under the heading for the installed version of Visual Studio, open the **Visual Studio** folder (in older versions of Visual Studio, it may be named **Visual Studio Tools**). On earlier versions of Windows, choose **Start**, expand **All Programs**, the folder for your version of **Visual Studio** (and on older versions of Visual Studio, **Visual Studio Tools**). For more information, see [Developer command prompt shortcuts](building-on-the-command-line.md#developer_command_prompt_shortcuts).
20
+
When Visual Studio is installed on a 64-bit Windows operating system, additional developer command prompt shortcuts for the 64-bit, x64-hosted native and cross compilers are available. To access these command prompts on Windows 10, on the **Start** menu, open the folder for your version of Visual Studio, for example **Visual Studio 2019**, and then choose one of the x64 native or cross-tool developer command prompts. To access these command prompts on Windows 8, on the **Start** screen, open **All apps**. Under the heading for the installed version of Visual Studio, open the **Visual Studio** folder (in older versions of Visual Studio, it may be named **Visual Studio Tools**). On earlier versions of Windows, choose **Start**, expand **All Programs**, the folder for your version of **Visual Studio** (and on older versions of Visual Studio, **Visual Studio Tools**). For more information, see [Developer command prompt shortcuts](building-on-the-command-line.md#developer_command_prompt_shortcuts).
21
21
22
22
## Use Vcvarsall.bat to set a 64-bit hosted build architecture
@@ -16,15 +16,15 @@ This document explains how to create a file in a set directory that contains pro
16
16
17
17
1. In the XML editor, create an XML file.
18
18
19
-
1. Save the file in the Visual Studio 2017 `VCTargets\1033` folder. You will have a different path for each edition of Visual Studio 2017 that is installed and each language. For example, the folder path for Visual Studio Enterprise edition in English is `%ProgramFiles%\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\1033`. Adjust the path for your language and Visual Studio edition. Every rule in the **Property Pages** window is represented by an XML file in this folder. Make sure that the file is uniquely named in the folder.
19
+
1. Save the file in the Visual Studio `VCTargets\1033` folder. You will have a different path for each edition of Visual Studio that is installed and each language. For example, the default folder path for Visual Studio 2019 Community edition in English is `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\VC\VCTargets`. Adjust the path for your language and Visual Studio edition. Every rule in the **Property Pages** window is represented by an XML file in this folder. Make sure that the file is uniquely named in the folder.
20
20
21
-
1. Copy the content of `%ProgramFiles%\Microsoft Visual Studio\2017\<VS Edition>\Common7\IDE\VC\VCTargets\<LCID>\cl.xml`, close it without saving changes, and then paste the content in your new XML file. You can use any XML schema file - this is just one that can be used so you start with a template.
21
+
1. Copy the content of `%ProgramFiles%\Microsoft Visual Studio\2019\<VS Edition>\Common7\IDE\VC\VCTargets\<LCID>\cl.xml` (or whatever your path is), close it without saving changes, and then paste the content in your new XML file. You can use any XML schema file - this is just one that can be used so you start with a template.
22
22
23
23
1. In the new XML file, modify the content according to your requirements. Make sure to change the **Rule Name** and **Rule.DisplayName** at the top of the file.
24
24
25
25
1. Save the changes and close the file.
26
26
27
-
1. The XML files in `%ProgramFiles%\Microsoft Visual Studio\2017\<VS Edition>\Common7\IDE\VC\VCTargets\<LCID>` are loaded when Visual Studio starts. Therefore, to test the new file, restart Visual Studio.
27
+
1. The XML files in `%ProgramFiles%\Microsoft Visual Studio\2019\<VS Edition>\Common7\IDE\VC\VCTargets\<LCID>` (or wherever you saved them) are loaded when Visual Studio starts. Therefore, to test the new file, restart Visual Studio.
28
28
29
29
1. In **Solution Explorer**, right-click a project and then click **Properties**. In the **Property Pages** window, in the left pane, verify that there is a new node with the name of your Rule.
@@ -10,7 +10,7 @@ The Visual Studio project system is based on MSBuild, which defines file formats
10
10
11
11
## The .vcxproj file, .props files and .targets files
12
12
13
-
Project properties are stored either directly in the project file (*.vcxproj) or in other .targets or .props files that the project file imports and which supply default values. For Visual Studio 2015, these files are located in **\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140**. For Visual Studio 2017, these files are located in **\\Program Files (x86)\\Microsoft Visual Studio\\2017\\_edition_\\Common7\\IDE\\VC\\VCTargets**, where _edition_ is the Visual Studio edition installed. Properties are also stored in any custom .props files that you might add to your own project. We highly recommend that you NOT edit those files manually, and instead use the property pages in the IDE to modify all properties, especially those that participate in inheritance, unless you have a very good understanding of MSBuild.
13
+
Project properties are stored either directly in the project file (*.vcxproj) or in other .targets or .props files that the project file imports and which supply default values. For Visual Studio 2015, these files are located in **\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140**. For Visual Studio 2017 or Visual Studio 2019, these files are located in **\\Program Files (x86)\\Microsoft Visual Studio\\<2017 or 2019>\\_edition_\\Common7\\IDE\\VC\\VCTargets**, where _edition_ is the Visual Studio edition installed. Properties are also stored in any custom .props files that you might add to your own project. We highly recommend that you NOT edit those files manually, and instead use the property pages in the IDE to modify all properties, especially those that participate in inheritance, unless you have a very good understanding of MSBuild.
14
14
15
15
As shown earlier, the same property for the same configuration may be assigned a different value in these different files. When you build a project, the MSBuild engine evaluates the project file and all the imported files in a well-defined order (described below). As each file is evaluated, any property values defined in that file will override the existing values. Any values that are not specified are inherited from files that were evaluated earlier. Therefore, when you set a property with property pages, it is also important to pay attention to where you set it. If you set a property to "X" in a .props file, but the property is set to "Y" in the project file, then the project will build with the property set to "Y". If the same property is set to "Z" on a project item, such as a .cpp file, then the MSBuild engine will use the "Z" value.
Copy file name to clipboardExpand all lines: docs/build/reference/clr-restrictions.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ Note the following restrictions on the use of **/clr**:
63
63
64
64
- Functions that take a variable number of arguments (varargs) will be generated as native functions. Any managed data types in the variable argument position will be marshaled to native types. Note that <xref:System.String?displayProperty=fullName> types are actually wide-character strings, but they are marshaled to single-byte character strings. So if a printf specifier is %S (wchar_t*), it will marshal to a %s string instead.
65
65
66
-
- When using the va_arg macro, you may get unexpected results when compiling with **/clr:pure**. For more information, see [va_arg, va_copy, va_end, va_start](../../c-runtime-library/reference/va-arg-va-copy-va-end-va-start.md). The **/clr:pure** and **/clr:safe** compiler options are deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017. Code that must be "pure" or "safe" should be ported to C#.
66
+
- When using the va_arg macro, you may get unexpected results when compiling with **/clr:pure**. For more information, see [va_arg, va_copy, va_end, va_start](../../c-runtime-library/reference/va-arg-va-copy-va-end-va-start.md). The **/clr:pure** and **/clr:safe** compiler options are deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017 and later. Code that must be "pure" or "safe" should be ported to C#.
67
67
68
68
- You should not call, from managed code, any functions that walk the stack to get parameter information (function arguments); the P/Invoke layer causes that information to be further down the stack. For example, do not compile proxy/stub with **/clr**.
0 commit comments