Skip to content

Commit d751934

Browse files
authored
Merge pull request #8459 from MicrosoftDocs/main637986350623520407sync_temp
Repo sync for protected CLA branch
2 parents 87fa960 + f324b7d commit d751934

File tree

2 files changed

+26
-18
lines changed

2 files changed

+26
-18
lines changed

docs/get-started/visual-basic/index.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
description: Create Visual Basic apps by using Visual Studio.
99
ms.custom: vs-acquisition
1010
ms.topic: landing-page
11-
ms.date: 06/19/2021
11+
ms.date: 09/01/2022
1212
ms.author: ghogen
1313
author: ghogen
1414
manager: jmartens

docs/ide/how-to-sign-application-and-deployment-manifests.md

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
title: 'How to: Sign application and deployment manifests'
33
description: Learn about requirements for signing for publishing ClickOnce application and deployment manifests. Signing is optional for .exe-based applications.
4-
ms.custom: SEO-VS-2020
5-
ms.date: 11/04/2016
4+
ms.date: 09/12/2022
65
ms.technology: vs-ide-deployment
76
ms.topic: conceptual
87
helpviewer_keywords:
@@ -27,6 +26,8 @@ ms.workload:
2726

2827
If you want to publish an application by using ClickOnce deployment, the application and deployment manifests must be signed with a public/private key pair and signed using Authenticode technology. You can sign the manifests by using a certificate from the Windows certificate store or a key file.
2928

29+
The information in this article applies only if you're using the .NET Framework 4.7.2 or earlier. If you're using .NET 5 or later, follow the steps in [Deploy a .NET Windows desktop application using ClickOnce](../deployment/quickstart-deploy-using-clickonce-folder.md).
30+
3031
For more information about ClickOnce deployment, see [ClickOnce security and deployment](../deployment/clickonce-security-and-deployment.md).
3132

3233
Signing the ClickOnce manifests is optional for *.exe*-based applications. For more information, see the "Generate unsigned manifests" section of this document.
@@ -38,50 +39,57 @@ For information about creating key files, see [How to: Create a public-private k
3839
3940
## Sign using a certificate
4041

42+
To use this method, you must have a certificate signed by a certificate authority (CA). Certificates are issued by third-party certification service providers, or by authorized organizations within an Enterprise.
43+
4144
1. Go to the project properties window (right-click the project node in **Solution Explorer** and select **Properties**). On the **Signing** tab, select the **Sign the ClickOnce manifests** check box.
4245

43-
2. Click the **Select from Store** button.
46+
1. Click the **Select from Store** button.
4447

4548
The **Select a Certificate** dialog box appears and displays the contents of the Windows certificate store.
4649

4750
> [!TIP]
4851
> If you click **Click here to view certificate properties**, the **Certificate Details** dialog box appears. This dialog box includes detailed information about the certificate and additional options. Click **Certificates** to view additional help information.
4952
50-
3. Select the certificate that you want to use to sign the manifests.
53+
1. Select the certificate that you want to use to sign the manifests.
5154

52-
4. Additionally, you can specify the address of a timestamp server in the **Timestamp server URL** text box. This is a server that provides a timestamp specifying when the manifest was signed.
55+
> [!TIP]
56+
> If there aren't any certificates in the store, you can still [sign using a test certificate](#sign-using-a-test-certificate).
57+
58+
1. Additionally, you can specify the address of a timestamp server in the **Timestamp server URL** text box. This is a server that provides a timestamp specifying when the manifest was signed. It's usually provided by the same third party that offers certificates signed by a CA.
5359

5460
## Sign using an existing key file
5561

5662
1. On the **Signing** page, select the **Sign the ClickOnce manifests** check box.
5763

58-
2. Click the **Select from File** button.
64+
1. Click the **Select from File** button.
5965

6066
The **Select File** dialog box appears.
6167

62-
3. In the **Select File** dialog box, browse to the location of the key file (*.pfx*) that you want to use, and then click **Open**.
68+
1. In the **Select File** dialog box, browse to the location of the key file (*.pfx*) that you want to use, and then click **Open**.
6369

6470
> [!NOTE]
6571
> This option supports only files that have the *.pfx* extension. If you have a key file or certificate in another format, store it in the Windows certificate store and select the certificate is described in the previous procedure. The selected certificate's purpose should include code signing.
6672
6773
The **Enter password to open file** dialog box appears. (If the *.pfx* file is already stored in your Windows certificate store or is not password protected, you aren't prompted to enter a password.)
6874

69-
4. Enter the password to access the key file, and then select **Enter**.
75+
1. Enter the password to access the key file, and then select **Enter**.
7076

7177
> [!NOTE]
7278
> The *.pfx* file cannot include certificate chaining information. If it does, the following import error will occur: **Cannot find the certificate and private key for decryption**. To remove the certificate chaining information, you can use *Certmgr.msc* and [disable the option](/previous-versions/aa730868(v=vs.80)) to **Include all certificates** when exporting the *.pfx file.
7379
7480
## Sign using a test certificate
7581

82+
Test certificates are not signed by a Certificate Authority (CA) and should only be used for testing purposes. For details on test certificates, see [How using certificates authorities helps users](../deployment/clickonce-and-authenticode.md#how-using-certificate-authorities-helps-users).
83+
7684
1. On the **Signing** page, select the **Sign the ClickOnce manifests** check box.
7785

78-
2. To create a new certificate for testing, click the **Create Test Certificate** button.
86+
1. To create a new certificate for testing, click the **Create Test Certificate** button.
7987

80-
3. In the **Create Test Certificate** dialog box, enter a password to help secure your test certificate.
88+
1. In the **Create Test Certificate** dialog box, enter a password to help secure your test certificate.
8189

8290
## Generate unsigned manifests
8391

84-
Signing the ClickOnce manifests is optional for *.exe*-based applications. The following procedures show how to generate unsigned ClickOnce manifests.
92+
Signing the ClickOnce manifests is optional for `.exe`-based applications. The following procedures show how to generate unsigned ClickOnce manifests.
8593

8694
> [!IMPORTANT]
8795
> Unsigned manifests can simplify development and testing of your application. However, unsigned manifests introduce substantial security risks in a production environment. Only consider using unsigned manifests if your ClickOnce application runs on computers within an intranet that is completely isolated from the internet or other sources of malicious code.
@@ -90,24 +98,24 @@ By default, ClickOnce automatically generates signed manifests unless one or mor
9098

9199
### To generate unsigned manifests and include all files in the generated hash
92100

93-
1. To generate unsigned manifests that include all files in the hash, you must first publish the application together with signed manifests. Therefore, first sign the ClickOnce manifests by following one of the previous procedures, and then publish the application.
101+
To generate unsigned manifests that include all files in the hash, you must first publish the application together with signed manifests. Therefore, first sign the ClickOnce manifests by following one of the previous procedures, and then publish the application.
94102

95-
2. On the **Signing** page, clear the **Sign the ClickOnce manifests** check box.
103+
1. On the **Signing** tab, clear the **Sign the ClickOnce manifests** check box.
96104

97-
3. Reset the publish version so that only one version of your application is available. By default, Visual Studio automatically increments the revision number of the publish version every time that you publish an application. For more information, see [How to: Set the ClickOnce publish version](../deployment/how-to-set-the-clickonce-publish-version.md).
105+
1. On the **Publish** tab, reset the publish version so that only one version of your application is available. Clear the checkbox for **Automatically increment the version with each publish**. By default, Visual Studio automatically increments the revision number of the publish version every time that you publish an application. For more information, see [How to: Set the ClickOnce publish version](../deployment/how-to-set-the-clickonce-publish-version.md).
98106

99-
4. Publish the application.
107+
1. Publish the application. Visual Studio tells you that the application was signed with a different key than the existing application on the server, and asks if you want to overwrite it. Choose **Yes**.
100108

101109
### To generate unsigned manifests and exclude one or more files from the generated hash
102110

103111
1. On the **Signing** page, clear the **Sign the ClickOnce manifests** check box.
104112

105-
2. Open the **Application Files** dialog box and set the **Hash** to **Exclude** for the files that you want to exclude from the generated hash.
113+
1. On the **Publish** tab, choose the **Application Files** button to open the **Application Files** dialog box, and set the **Hash** to **Exclude** for the files that you want to exclude from the generated hash.
106114

107115
> [!NOTE]
108116
> Excluding a file from the hash configures ClickOnce to disable automatic signing of the manifests, so you do not need to first publish with signed manifests as shown in the previous procedure.
109117
110-
3. Publish the application.
118+
1. Publish the application.
111119

112120
## See also
113121

0 commit comments

Comments
 (0)