Skip to content

Commit 5a2e202

Browse files
committed
add new compiler options
The new options are: -pathmap -publicsign -keyfile now works on CoreCLR (-keycontainer does not) Also, fixed a variety of markdown lint warnings. These are mostly whitespace. Reviews will be easier using the rich diff view.
1 parent 54c2f64 commit 5a2e202

File tree

8 files changed

+311
-198
lines changed

8 files changed

+311
-198
lines changed
Lines changed: 39 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "-delaysign (C# Compiler Options)"
3-
ms.date: 07/20/2015
3+
ms.date: 05/15/2018
44
f1_keywords:
55
- "/delaysign"
66
helpviewer_keywords:
@@ -10,35 +10,42 @@ helpviewer_keywords:
1010
ms.assetid: bcb058eb-2933-4e7f-b356-5c941db4de75
1111
---
1212
# -delaysign (C# Compiler Options)
13-
This option causes the compiler to reserve space in the output file so that a digital signature can be added later.
14-
15-
## Syntax
16-
17-
```console
18-
-delaysign[ + | - ]
19-
```
20-
21-
## Arguments
22-
`+` | `-`
23-
Use **-delaysign-** if you want a fully signed assembly. Use **-delaysign+** if you only want to place the public key in the assembly. The default is **-delaysign-**.
24-
25-
## Remarks
26-
The **-delaysign** option has no effect unless used with [-keyfile](../../../csharp/language-reference/compiler-options/keyfile-compiler-option.md) or [-keycontainer](../../../csharp/language-reference/compiler-options/keycontainer-compiler-option.md).
27-
28-
When you request a fully signed assembly, the compiler hashes the file that contains the manifest (assembly metadata) and signs that hash with the private key. The resulting digital signature is stored in the file that contains the manifest. When an assembly is delay signed, the compiler does not compute and store the signature, but reserves space in the file so the signature can be added later.
29-
30-
For example, using **-delaysign+** allows a tester to put the assembly in the global cache. After testing, you can fully sign the assembly by placing the private key in the assembly using the [Assembly Linker](../../../framework/tools/al-exe-assembly-linker.md) utility.
31-
32-
For more information, see [Creating and Using Strong-Named Assemblies](../../../framework/app-domains/create-and-use-strong-named-assemblies.md) and [Delay Signing an Assembly](../../../framework/app-domains/delay-sign-assembly.md).
33-
34-
### To set this compiler option in the Visual Studio development environment
35-
36-
1. Open the **Properties** page for the project.
37-
38-
2. Modify the **Delay sign only** property.
39-
40-
For information on how to set this compiler option programmatically, see <xref:VSLangProj80.ProjectProperties3.DelaySign%2A>.
41-
42-
## See Also
43-
[C# Compiler Options](../../../csharp/language-reference/compiler-options/index.md)
13+
14+
This option causes the compiler to reserve space in the output file so that a digital signature can be added later.
15+
16+
## Syntax
17+
18+
```console
19+
-delaysign[ + | - ]
20+
```
21+
22+
## Arguments
23+
24+
`+` &#124; `-`
25+
26+
Use **-delaysign-** if you want a fully signed assembly. Use **-delaysign+** if you only want to place the public key in the assembly. The default is **-delaysign-**.
27+
28+
## Remarks
29+
30+
The **-delaysign** option has no effect unless used with [-keyfile](../../../csharp/language-reference/compiler-options/keyfile-compiler-option.md) or [-keycontainer](../../../csharp/language-reference/compiler-options/keycontainer-compiler-option.md).
31+
32+
The **-delaysign** and **-publicsign** options are mutually exclusive.
33+
34+
When you request a fully signed assembly, the compiler hashes the file that contains the manifest (assembly metadata) and signs that hash with the private key. The resulting digital signature is stored in the file that contains the manifest. When an assembly is delay signed, the compiler does not compute and store the signature, but reserves space in the file so the signature can be added later.
35+
36+
For example, using **-delaysign+** allows a tester to put the assembly in the global cache. After testing, you can fully sign the assembly by placing the private key in the assembly using the [Assembly Linker](../../../framework/tools/al-exe-assembly-linker.md) utility.
37+
38+
For more information, see [Creating and Using Strong-Named Assemblies](../../../framework/app-domains/create-and-use-strong-named-assemblies.md) and [Delay Signing an Assembly](../../../framework/app-domains/delay-sign-assembly.md).
39+
40+
### To set this compiler option in the Visual Studio development environment
41+
42+
1. Open the **Properties** page for the project.
43+
1. Modify the **Delay sign only** property.
44+
45+
For information on how to set this compiler option programmatically, see <xref:VSLangProj80.ProjectProperties3.DelaySign%2A>.
46+
47+
## See Also
48+
49+
[C# -publicsign option](publicsign-compiler-option.md)
50+
[C# Compiler Options](index.md)
4451
[Managing Project and Solution Properties](/visualstudio/ide/managing-project-and-solution-properties)

docs/csharp/language-reference/compiler-options/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ The compiler produces executable (.exe) files, dynamic-link libraries (.dll), or
1919
In Visual Studio, you set compiler options in the web.config file. For more information, see [\<compiler> Element](../../../framework/configure-apps/file-schema/compiler/compiler-element.md).
2020

2121
## In This Section
22-
[Command-line Building With csc.exe](../../../csharp/language-reference/compiler-options/command-line-building-with-csc-exe.md)
22+
[Command-line Building With csc.exe](command-line-building-with-csc-exe.md)
2323
Information about building a Visual C# application from the command line.
2424

25-
[How to: Set Environment Variables for the Visual Studio Command Line](../../../csharp/language-reference/compiler-options/how-to-set-environment-variables-for-the-visual-studio-command-line.md)
25+
[How to: Set Environment Variables for the Visual Studio Command Line](how-to-set-environment-variables-for-the-visual-studio-command-line.md)
2626
Provides steps for running vsvars32.bat to enable command-line builds.
2727

28-
[C# Compiler Options Listed by Category](../../../csharp/language-reference/compiler-options/listed-by-category.md)
28+
[C# Compiler Options Listed by Category](listed-by-category.md)
2929
A categorical listing of the compiler options.
3030

31-
[C# Compiler Options Listed Alphabetically](../../../csharp/language-reference/compiler-options/listed-alphabetically.md)
31+
[C# Compiler Options Listed Alphabetically](listed-alphabetically.md)
3232
An alphabetical listing of the compiler options.
3333

3434
## Related Sections

docs/csharp/language-reference/compiler-options/keycontainer-compiler-option.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "-keycontainer (C# Compiler Options)"
3-
ms.date: 07/20/2015
3+
ms.date: 05/16/2018
44
f1_keywords:
55
- "/keycontainer"
66
helpviewer_keywords:
@@ -23,7 +23,7 @@ Specifies the name of the cryptographic key container.
2323
The name of the strong name key container.
2424

2525
## Remarks
26-
When the **-keycontainer** option is used, the compiler creates a sharable component by inserting a public key from the specified container into the assembly manifest and signing the final assembly with the private key. To generate a key file, type sn -k `file` at the command line. sn -i installs the key pair into a container.
26+
When the **-keycontainer** option is used, the compiler creates a sharable component by inserting a public key from the specified container into the assembly manifest and signing the final assembly with the private key. To generate a key file, type sn -k `file` at the command line. sn -i installs the key pair into a container. This option is not supported when the compiler is running on CoreCLR. To sign an assembly when building on CoreCLR, use the [-keyfile](keyfile-compiler-option.md) option.
2727

2828
If you compile with [-target:module](../../../csharp/language-reference/compiler-options/target-module-compiler-option.md), the name of the key file is held in the module and incorporated into the assembly when you compile this module into an assembly with [-addmodule](../../../csharp/language-reference/compiler-options/addmodule-compiler-option.md).
2929

@@ -40,5 +40,6 @@ Specifies the name of the cryptographic key container.
4040
You can programmatically access this compiler option with <xref:VSLangProj.ProjectProperties.AssemblyKeyContainerName%2A>.
4141

4242
## See Also
43-
[C# Compiler Options](../../../csharp/language-reference/compiler-options/index.md)
43+
[C# Compiler -keyfile option](keyfile-compiler-option.md)
44+
[C# Compiler Options](index.md)
4445
[Managing Project and Solution Properties](/visualstudio/ide/managing-project-and-solution-properties)

0 commit comments

Comments
 (0)