Skip to content

Commit c4971a8

Browse files
authored
Merge pull request #7985 from MicrosoftDocs/main637874896201335077
For protected CLA branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents 636f306 + 4b9336e commit c4971a8

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed
Loading

docs/msbuild/errors/msb3325.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "MSB3325: Cannot import the following key file"
33
description: "."
4-
ms.date: "07/22/2021"
4+
ms.date: "05/05/2022"
55
ms.topic: "error-reference"
66
f1_keywords:
77
- MSB3325
@@ -26,7 +26,7 @@ The full error text is similar to the following example:
2626
MSB3325: Cannot import the following key file: {0}. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: 'name'
2727
```
2828

29-
You could get this error if you checked the **Sign the assembly** option in the **Signing** tab of **Project Properties** and chose a .pfx file for assembly signing. In this case, the strong name public key should get imported to the Cryptographic Service Provider (CSP) on the machine when the .pfx file is selected. When you publish an app, MSBuild tries to sign the assembly. If the signing code could not read the strong name public key from the strong name CSP for any reason, it gives this error.
29+
You could get this error if you checked the **Sign the assembly** option in the **Project Properties** and chose a .pfx file for assembly signing. In this case, the strong name public key should get imported to the Cryptographic Service Provider (CSP) on the machine when the .pfx file is selected. When you publish an app, MSBuild tries to sign the assembly. If the signing code could not read the strong name public key from the strong name CSP for any reason, it gives this error.
3030

3131
When you get this error for any reason, the workaround is to manually install the .pfx in the strong name Cryptographic Service Provider (CSP) with the key container name specified in the error message.
3232

@@ -38,6 +38,10 @@ sn.exe -i <pfx_file> <key_container_name_from_error_message>
3838

3939
After that, the publish process should be able to read the strong name public key from the CSP and strong name sign the assembly.
4040

41-
![Screenshot of Signing tab in Project Properties](media/msb3325/signing-sign-the-assembly.png)
41+
![Screenshot of Signing tab in Project Properties.](media/msb3325/signing-sign-the-assembly.png)
4242

43-
See [How to: Sign application and deployment manifests](../../ide/how-to-sign-application-and-deployment-manifests.md).
43+
:::moniker range=">=vs-2022"
44+
For newer .NET projects, the strong name setting is in the **Build** section of the **Project Properties**:
45+
46+
![Screenshot of the Build > Strong naming section of the Project Properties.](media/msb3325/sign-the-assembly.png)
47+
:::moniker-end

docs/msbuild/errors/msb3327.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "MSB3327"
33
description: "Unable to find code signing certificate in the current user’s Windows certificate store."
4-
ms.date: "07/22/2021"
4+
ms.date: "05/05/2022"
55
ms.topic: "error-reference"
66
f1_keywords:
77
- MSB3327
@@ -32,7 +32,13 @@ To resolve this error, try re-importing the .pfx file again in the certificate s
3232

3333
![Screenshot of signing tab](media/msb3327/signing-install-pfx.png)
3434

35+
:::moniker range="vs-2017"
3536
See [How to: Sign application and deployment manifests](../../ide/how-to-sign-application-and-deployment-manifests.md).
37+
:::moniker-end
38+
39+
:::moniker range=">=vs-2019"
40+
See [How to: Sign application and deployment manifests](../../ide/how-to-sign-application-and-deployment-manifests.md) or for newer .NET projects in Visual Studio 2019 or later, see [Deploy a .NET Windows Desktop application using ClickOnce](../../deployment/quickstart-deploy-using-clickonce-folder.md).
41+
:::moniker-end
3642

3743
When running in a non-interactive environment, such as a script in a pipeline, use the command-line tool [certutil](/windows-server/administration/windows-commands/certutil).
3844

0 commit comments

Comments
 (0)