Skip to content

Commit b6d3188

Browse files
authored
Provide F1 links to articles for VS linker properties (#4529)
* Update F1 links for Linker Properties * F1 Project: Linker Properties part 1 * Finish Linker properties F1 links * Fix typo * Fix acrolinx related issues
1 parent 24a273d commit b6d3188

25 files changed

+441
-377
lines changed

docs/build/reference/cetcompat.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
description: "Learn more about: /CETCOMPAT (CET Shadow Stack compatible)"
33
title: "/CETCOMPAT (CET Shadow Stack compatible)"
44
ms.date: 09/22/2021
5-
f1_keywords: ["/CETCOMPAT"]
5+
f1_keywords: ["VC.Project.VCLinkerTool.CETCompat", "/CETCOMPAT"]
66
helpviewer_keywords: ["/CETCOMPAT linker option", "/CETCOMPAT"]
77
---
8-
# /CETCOMPAT (CET Shadow Stack compatible)
8+
# `/CETCOMPAT` (CET Shadow Stack compatible)
99

10-
Specifies whether to mark an executable image as compatible with Control-flow Enforcement Technology (CET) Shadow Stack.
10+
Specifies whether the linker marks an executable image as compatible with Control-flow Enforcement Technology (CET) Shadow Stack.
1111

1212
## Syntax
1313

@@ -21,7 +21,7 @@ Specifies that the executable shouldn't be marked compatible with CET Shadow Sta
2121

2222
## Remarks
2323

24-
Control-flow Enforcement Technology (CET) Shadow Stack is a computer processor feature. It provides capabilities to defend against return-oriented programming (ROP) based malware attacks. For more information, see [A Technical Look at Intels Control-flow Enforcement Technology](https://software.intel.com/content/www/us/en/develop/articles/technical-look-control-flow-enforcement-technology.html).
24+
Control-flow Enforcement Technology (CET) Shadow Stack is a computer processor feature. It provides capabilities to defend against return-oriented programming (ROP) based malware attacks. For more information, see [A Technical Look at Intel's Control-flow Enforcement Technology](https://software.intel.com/content/www/us/en/develop/articles/technical-look-control-flow-enforcement-technology.html).
2525

2626
The **`/CETCOMPAT`** linker option tells the linker to mark the binary as CET Shadow Stack-compatible. **`/CETCOMPAT:NO`** marks the binary as not compatible with CET Shadow Stack. If both options are specified on the command line, the last one specified is used. This switch is currently only applicable to x86 and x64 architectures.
2727

@@ -31,7 +31,7 @@ The **`/CETCOMPAT`** option is available beginning in Visual Studio 2019.
3131

3232
Starting in Visual Studio 2019 version 16.7:
3333

34-
1. Open the **Property Pages** dialog box for the project. For more information, see [Working with Project Properties](../working-with-project-properties.md).
34+
1. Open the **Property Pages** dialog box for the project. For more information, see [Set compiler and build properties](../working-with-project-properties.md).
3535

3636
1. Select the **Configuration Properties** > **Linker** > **Advanced** property page.
3737

@@ -41,7 +41,7 @@ Starting in Visual Studio 2019 version 16.7:
4141

4242
In previous versions of Visual Studio 2019:
4343

44-
1. Open the **Property Pages** dialog box for the project. For more information, see [Working with Project Properties](../working-with-project-properties.md).
44+
1. Open the **Property Pages** dialog box for the project. For more information, see [Set compiler and build properties](../working-with-project-properties.md).
4545

4646
1. Select the **Configuration Properties** > **Linker** > **Command Line** property page.
4747

docs/build/reference/clrsupportlasterror-preserve-last-error-code-for-pinvoke-calls.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
---
22
description: "Learn more about: /CLRSUPPORTLASTERROR (Preserve Last Error Code for PInvoke Calls)"
33
title: "/CLRSUPPORTLASTERROR (Preserve Last Error Code for PInvoke Calls)"
4-
ms.date: "11/04/2016"
5-
f1_keywords: ["/CLRSUPPORTLASTERROR"]
4+
ms.date: 09/19/2022
5+
f1_keywords: ["VC.Project.VCLinkerTool.CLRSupportLastError", "/CLRSUPPORTLASTERROR"]
66
helpviewer_keywords: ["/CLRSUPPORTLASTERROR linker option", "-CLRSUPPORTLASTERROR linker option"]
77
ms.assetid: b7057990-4154-4b1d-9fc9-6236f7be7575
88
---
9-
# /CLRSUPPORTLASTERROR (Preserve Last Error Code for PInvoke Calls)
9+
# `/CLRSUPPORTLASTERROR` (Preserve Last Error Code for PInvoke Calls)
1010

11-
**/CLRSUPPORTLASTERROR**, which is on by default, preserves the last error code of functions called through the P/Invoke mechanism, which allows you to call native functions in DLLS, from code compiled with **/clr**.
11+
**`/CLRSUPPORTLASTERROR`**, which is on by default, preserves the last error code of functions called through the P/Invoke mechanism, which allows you to call native functions in DLLS, from code compiled with **`/clr`**.
1212

1313
## Syntax
1414

15-
```
16-
/CLRSUPPORTLASTERROR{:NO | SYSTEMDLL}
17-
```
15+
> **`/CLRSUPPORTLASTERROR`**\
16+
> **`/CLRSUPPORTLASTERROR:NO`**\
17+
> **`/CLRSUPPORTLASTERROR:SYSTEMDLL`**
1818
1919
## Remarks
2020

21-
Preserving the last error code implies a decrease in performance. If you do not want to incur the performance impact of preserving the last error code, link with **/CLRSUPPORTLASTERROR:NO**.
21+
Preserving the last error code implies a decrease in performance. If you don't want to incur the performance cost of preserving the last error code, link by using **`/CLRSUPPORTLASTERROR:NO`**.
2222

23-
You can minimize the performance impact by linking with **/CLRSUPPORTLASTERROR:SYSTEMDLL**, which only preserves the last error code for functions in system DLLs.
23+
You can minimize the performance penalty by linking with **`/CLRSUPPORTLASTERROR:SYSTEMDLL`**, which only preserves the last error code for functions in system DLLs.
2424

2525
> [!NOTE]
26-
> Preserving the last error is not supported for unmanaged functions that are consumed by CLR code, in the same module.
26+
> Preserving the last error isn't supported for unmanaged functions that are consumed by CLR code in the same module.
2727
28-
- For more information, see [/clr (Common Language Runtime Compilation)](clr-common-language-runtime-compilation.md).
28+
- For more information, see [`/clr` (Common Language Runtime Compilation)](clr-common-language-runtime-compilation.md).
2929

3030
### To set this linker option in the Visual Studio development environment
3131

32-
1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
32+
1. Open the **Property Pages** dialog box for the project. For more information, see [Set compiler and build properties](../working-with-project-properties.md).
3333

34-
1. Select the **Configuration Properties** > **Linker** > **Command Line** property page.
34+
1. Select the **Configuration Properties** > **Linker** > **Advanced** property page.
3535

36-
1. Enter the option into the **Additional Options** box.
36+
1. Modify the **Preserve Last Error Code for PInvoke Calls** property. Choose **OK** or **Apply** to save your changes.
3737

3838
### To set this linker option programmatically
3939

@@ -56,7 +56,7 @@ __declspec(dllexport) double MySqrt(__int64 n) {
5656
}
5757
```
5858
59-
The following sample consumes the DLL, demonstrating how to use **/CLRSUPPORTLASTERROR**.
59+
The following sample consumes the DLL, demonstrating how to use **`/CLRSUPPORTLASTERROR`**.
6060
6161
```cpp
6262
// CLRSUPPORTLASTERROR_client.cpp
@@ -109,5 +109,5 @@ GetLastError for system call succeeded (183).
109109

110110
## See also
111111

112-
[MSVC linker reference](linking.md)<br/>
113-
[MSVC Linker Options](linker-options.md)
112+
[MSVC linker reference](linking.md)\
113+
[MSVC linker options](linker-options.md)
Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,38 @@
11
---
22
description: "Learn more about: /CLRUNMANAGEDCODECHECK (Remove SuppressUnmanagedCodeSecurityAttribute)"
33
title: "/CLRUNMANAGEDCODECHECK (Remove SuppressUnmanagedCodeSecurityAttribute)"
4-
ms.date: "05/16/2019"
4+
ms.date: 09/19/2022
55
ms.topic: "reference"
6-
f1_keywords: ["/CLRUNMANAGEDCODECHECK"]
6+
f1_keywords: ["VC.Project.VCLinkerTool.CLRUnmanagedCodeCheck", "/CLRUNMANAGEDCODECHECK"]
77
helpviewer_keywords: ["-CLRUNMANAGEDCODECHECK linker option", "/CLRUNMANAGEDCODECHECK linker option"]
88
ms.assetid: 73abc426-dab0-45e2-be85-0f9a14206cc2
99
author: "corob-msft"
1010
ms.author: "corob"
1111
---
12-
# /CLRUNMANAGEDCODECHECK (Remove SuppressUnmanagedCodeSecurityAttribute)
12+
# `/CLRUNMANAGEDCODECHECK` (Remove SuppressUnmanagedCodeSecurityAttribute)
1313

14-
**/CLRUNMANAGEDCODECHECK** specifies that the linker does not apply <xref:System.Security.SuppressUnmanagedCodeSecurityAttribute> to linker-generated `PInvoke` calls from managed code into native DLLs.
14+
**`/CLRUNMANAGEDCODECHECK`** specifies that the linker doesn't apply <xref:System.Security.SuppressUnmanagedCodeSecurityAttribute> to linker-generated `PInvoke` calls from managed code into native DLLs.
1515

1616
## Syntax
1717

18-
> **/CLRUNMANAGEDCODECHECK**[**:NO**]
18+
> **`/CLRUNMANAGEDCODECHECK`**\
19+
> **`/CLRUNMANAGEDCODECHECK:NO`**
1920
2021
## Remarks
2122

22-
By default, the linker applies the **SuppressUnmanagedCodeSecurityAttribute** to linker-generated `PInvoke` calls. When **/CLRUNMANAGEDCODECHECK** is in effect, **SuppressUnmanagedCodeSecurityAttribute** is removed. To explicitly apply the **SuppressUnmanagedCodeSecurityAttribute** to linker-generated `PInvoke` calls, you can use **/CLRUNMANAGEDCODECHECK:NO**.
23+
By default, the linker applies the `SuppressUnmanagedCodeSecurityAttribute` attribute to linker-generated `PInvoke` calls. When **`/CLRUNMANAGEDCODECHECK`** is in effect, `SuppressUnmanagedCodeSecurityAttribute` is removed. To explicitly apply the `SuppressUnmanagedCodeSecurityAttribute` attribute to linker-generated `PInvoke` calls, you can use **`/CLRUNMANAGEDCODECHECK:NO`**.
2324

24-
The linker only adds the attribute to objects that are compiled using **/clr** or **/clr:pure**. However, the **/clr:pure** compiler option is deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017 and later.
25+
The linker only adds the attribute to objects that are compiled using **`/clr`** or **`/clr:pure`**. However, the **`/clr:pure`** compiler option is deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017 and later.
2526

26-
A `PInvoke` call is generated by the linker when the linker cannot find a managed symbol to satisfy a reference from a managed caller but can find a native symbol to satisfy that reference. For more information about `PInvoke`, see [Calling Native Functions from Managed Code](../../dotnet/calling-native-functions-from-managed-code.md).
27+
A `PInvoke` call is generated by the linker when the linker can't find a managed symbol to satisfy a reference from a managed caller but can find a native symbol to satisfy that reference. For more information about `PInvoke`, see [Calling Native Functions from Managed Code](../../dotnet/calling-native-functions-from-managed-code.md).
2728

28-
Note that if you use <xref:System.Security.AllowPartiallyTrustedCallersAttribute> in your code, you should explicitly set **/CLRUNMANAGEDCODECHECK** to remove the **SuppressUnmanagedCodeSecurity** attribute. It is a potential security vulnerability if an image contains both the **SuppressUnmanagedCodeSecurity** and **AllowPartiallyTrustedCallers** attributes.
29+
If you use <xref:System.Security.AllowPartiallyTrustedCallersAttribute> in your code, you should explicitly set **`/CLRUNMANAGEDCODECHECK`** to remove the `SuppressUnmanagedCodeSecurity` attribute. It's a potential security vulnerability if an image contains both the `SuppressUnmanagedCodeSecurity` and `AllowPartiallyTrustedCallers` attributes.
2930

30-
See [Secure Coding Guidelines for Unmanaged Code](/previous-versions/dotnet/framework/windows-identity-foundation/secure-coding-guidelines-for-unmanaged-code) for more information about the implications of using **SuppressUnmanagedCodeSecurityAttribute**.
31+
For more information about the implications of using `SuppressUnmanagedCodeSecurityAttribute`, see [Secure Coding Guidelines for Unmanaged Code](/previous-versions/dotnet/framework/windows-identity-foundation/secure-coding-guidelines-for-unmanaged-code).
3132

3233
### To set this linker option in the Visual Studio development environment
3334

34-
1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
35+
1. Open the **Property Pages** dialog box for the project. For more information, see [Set compiler and build properties](../working-with-project-properties.md).
3536

3637
1. Select the **Configuration Properties** > **Linker** > **Advanced** property page.
3738

@@ -43,5 +44,5 @@ See [Secure Coding Guidelines for Unmanaged Code](/previous-versions/dotnet/fram
4344

4445
## See also
4546

46-
- [MSVC linker reference](linking.md)
47-
- [MSVC Linker Options](linker-options.md)
47+
[MSVC linker reference](linking.md)\
48+
[MSVC linker options](linker-options.md)
Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,33 @@
11
---
2-
description: "Learn more about: Command Line Property Pages"
3-
title: "Command Line Property Pages"
4-
ms.date: "11/04/2016"
2+
description: "Learn more about: Command line property pages"
3+
title: "Command line property pages"
4+
ms.date: 09/21/2022
55
f1_keywords: ["vc.project.AdditionalOptionsPage", "vc.project.CommandLinePage"]
66
helpviewer_keywords: ["Command Line property pages"]
77
ms.assetid: e1721b6c-8b39-4b44-a41e-69b5bb470cc9
88
---
9-
# Command Line Property Pages
9+
# Command line property pages
1010

11-
Most property page folders contain a **Command Line** property page. This page displays which properties are set in the folder. The **Command Line** property page also contains an **Additional Options** box where you can specify properties that are valid for the tool but for which there is no property in the folder.
11+
Most property page folders that correspond with a command-line tool contain a **Command Line** property page. For information on how to access the **Command Line** property pages, see [Set compiler and build properties](../working-with-project-properties.md).
1212

13-
Any command that you enter in the edit box will be passed through to the tool for the folder. No verification or checks will be done on the input, nor will there be any dependency checking.
13+
## Command Line property page
1414

15-
For information on how to access the **Command Line** property pages, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
15+
### All Options
16+
17+
The **All Options** display-only control shows the tool command line created by the properties set in the folder.
18+
19+
### Additional Options
20+
21+
This property's edit control lets you specify other command-line options that are valid for the tool but that don't have a corresponding property.
22+
23+
The options that you enter in the edit box are passed through to the tool for the folder after the options listed in **All Options**. No verification or validity checks are done on the options you enter, and there's no dependency checking.
1624

1725
## See also
1826

19-
[C++ project property page reference](property-pages-visual-cpp.md)<br>
20-
[.Lib Files as Linker Input](dot-lib-files-as-linker-input.md)
27+
[Windows C++ project property page reference](property-pages-visual-cpp.md)\
28+
[Linux C++ property page reference](../../linux/prop-pages-linux.md)\
29+
[Linker property pages](./linker-property-pages.md)\
30+
[Manifest tool property pages](manifest-tool-property-pages.md)\
31+
[MIDL property pages](midl-property-pages.md)\
32+
[NMake property page](nmake-property-page.md)\
33+
[XML document generator tool property pages](xml-document-generator-tool-property-pages.md)
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
---
2-
description: "Learn more about: /DEF (Specify Module-Definition File)"
3-
title: "/DEF (Specify Module-Definition File)"
4-
ms.date: "11/04/2016"
2+
description: "Learn more about: /DEF (Specify module-definition file)"
3+
title: "/DEF (Specify module-definition file)"
4+
ms.date: 09/09/2022
55
f1_keywords: ["VC.Project.VCLinkerTool.ModuleDefinitionFile", "/def"]
66
helpviewer_keywords: ["module definition files, specifying", "DEF linker option", "-DEF linker option", "module definition files", "/DEF linker option"]
77
ms.assetid: 6497fa68-65f0-48ca-8f66-b87166fc631a
88
---
9-
# /DEF (Specify Module-Definition File)
9+
# `/DEF` (Specify module-definition file)
1010

11-
```
12-
/DEF:filename
13-
```
11+
Specifies a module-definition file to the linker.
12+
13+
## Syntax
14+
15+
> **`/DEF:`***`filename`*
1416
1517
## Arguments
1618

17-
*filename*<br/>
18-
The name of a module-definition file (.def) to be passed to the linker.
19+
*`filename`*\
20+
The name of a module-definition file (*`.def`*) to be passed to the linker.
1921

2022
## Remarks
2123

22-
The /DEF option passes a module-definition file (.def) to the linker. Only one .def file can be specified to LINK. For details about .def files, see [Module-Definition Files](module-definition-dot-def-files.md).
24+
The **`/DEF`** linker option passes a module-definition file (*`.def`*) to the linker. Only one *`.def`* file can be specified to LINK. For details about *`.def`* files, see [Module-definition files](module-definition-dot-def-files.md).
2325

24-
### To set this linker option in the Visual Studio development environment
26+
To specify a *`.def`* file from within the development environment, add it to the project along with your other source files and then specify the file in the project's **Property Pages** dialog.
2527

26-
1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
27-
28-
1. Click the **Linker** folder.
28+
### To set this linker option in the Visual Studio development environment
2929

30-
1. Click the **Input** property page.
30+
1. Open the project's **Property Pages** dialog box. For more information, see [Set compiler and build properties](../working-with-project-properties.md).
3131

32-
1. Modify the **Module Definition File** property.
32+
1. Select the **Configuration Properties** > **Linker** > **Input** property page.
3333

34-
To specify a .def file from within the development environment, you should add it to the project along with other files and then specify the file to the /DEF option.
34+
1. Modify the **Module Definition File** property. Choose **OK** or **Apply** to save your changes.
3535

3636
### To set this linker option programmatically
3737

3838
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.ModuleDefinitionFile%2A>.
3939

4040
## See also
4141

42-
[MSVC linker reference](linking.md)<br/>
42+
[MSVC linker reference](linking.md)\
4343
[MSVC Linker Options](linker-options.md)

docs/build/reference/delay-delay-load-import-settings.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
description: "Learn more about: /DELAY (Delay load import settings)"
33
title: "/DELAY (Delay load import settings)"
4-
ms.date: 01/28/2021
5-
f1_keywords: ["/delay", "VC.Project.VCLinkerTool.DelayNoBind", "VC.Project.VCLinkerTool.SupportUnloadOfDelayLoadedDLL", "VC.Project.VCLinkerTool.DelayUnload"]
4+
ms.date: 09/19/2022
5+
f1_keywords: ["/delay", "VC.Project.VCLinkerTool.DelayNoBind", "VC.Project.VCLinkerTool.SupportUnloadOfDelayLoadedDLL", "VC.Project.VCLinkerTool.DelayUnload", "VC.Project.VCLinkerTool.SupportNobindOfDelayLoadedDLL"]
66
helpviewer_keywords: ["delayed loading of DLLs, /DELAY option", "DELAY linker option", "/DELAY linker option", "-DELAY linker option"]
77
---
88
# `/DELAY` (Delay load import settings)
@@ -32,15 +32,15 @@ To specify DLLs to delay load, use the [`/DELAYLOAD`](delayload-delay-load-impor
3232

3333
### To set this linker option in the Visual Studio development environment
3434

35-
1. Open the project's **Property Pages** dialog box. For information, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
35+
1. Open the **Property Pages** dialog box for the project. For more information, see [Set compiler and build properties](../working-with-project-properties.md).
3636

3737
1. Select the **Configuration Properties** > **Linker** > **Advanced** property page.
3838

39-
1. Modify the **Delay Loaded DLL** property. Choose **OK** to save your changes.
39+
1. Modify the **Unload delay loaded DLL** property or the **Unbind delay loaded DLL** property. Choose **OK** or **Apply** to save your changes.
4040

4141
### To set this linker option programmatically
4242

43-
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.DelayLoadDLLs%2A>.
43+
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.AdditionalOptions%2A>.
4444

4545
## See also
4646

0 commit comments

Comments
 (0)