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/deployment/clickonce-security-and-deployment.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
@@ -96,7 +96,7 @@ ClickOnce is a deployment technology that enables you to create self-updating Wi
96
96
|Tool|Description|
97
97
|----------|-----------------|
98
98
|[Security Page, Project Designer](../ide/reference/security-page-project-designer.md)|Signs the application and deployment manifests. For .NET Core and .NET 5+, these settings are in the Publish profile.|
99
-
|[Publish Page, Project Designer](../ide/reference/publish-page-project-designer.md)|Generates and edits the application and deployment manifests for Visual Basic and Visual C# applications. For .NET Core and .NET 5+, these settings are in the Publish profile.|
99
+
|[Specify ClickOnce Publish properties](../deployment/how-to-specify-where-visual-studio-copies-the-files.md)|Generates and edits the application and deployment manifests for Visual Basic and Visual C# applications. For .NET Core and .NET 5+, these settings are in the Publish profile.|
100
100
|[*Mage.exe* (Manifest Generation and Editing Tool)](/dotnet/framework/tools/mage-exe-manifest-generation-and-editing-tool)|Generates the application and deployment manifests for Visual Basic, Visual C#, and Visual C++ applications.<br /><br /> Signs and re-signs the application and deployment manifests.<br /><br /> Can be run from batch scripts and the command prompt.|
101
101
|[*dotnetmage.exe* (Manifest Generation and Editing Tool)](https://github.com/dotnet/deployment-tools/blob/main/docs/dotnet-mage/README.md)|Generates the application and deployment manifests for .NET 5+ C# and Visual Basic applications. The usage is equivalent to *Mage.exe*.<br /><br /> Signs and re-signs the application and deployment manifests.<br /><br /> Can be run from batch scripts and the command prompt.|
102
102
|[*MageUI.exe* (Manifest Generation and Editing Tool, Graphical Client)](/dotnet/framework/tools/mageui-exe-manifest-generation-and-editing-tool-graphical-client)|Generates and edits the application and deployment manifests.<br /><br /> Signs and re-signs the application and deployment manifests.|
description: Learn how the Publish wizard automatically enables code access security for ClickOnce applications to publish the application.
4
4
ms.date: 04/25/2025
5
5
ms.topic: how-to
6
+
f1_keywords:
7
+
- vb.ProjectPropertiesSecurity
8
+
- vb.XBAPProjectPropertiesSecurity
9
+
- vs.err.debug_in_zone_no_hostproc
6
10
dev_langs:
7
11
- VB
8
12
- CSharp
@@ -24,7 +28,7 @@ You can enable and configure ClickOnce security settings in the **Security** pag
24
28
25
29
## Enable ClickOnce security settings
26
30
27
-
Code access security for ClickOnce applications must be enabled in order to publish the application. This is done automatically when you publish an application using the Publish wizard.
31
+
Code access security for ClickOnce applications must be enabled in order to publish the application. This is done automatically when you publish an application using the Publish wizard. For more information about code access security and security zones, see [Code Access Security for ClickOnce Applications](../deployment/code-access-security-for-clickonce-applications.md).
28
32
29
33
In some cases, enabling code access security can impact performance when building or debugging your application; in these cases, you may wish to temporarily disable the security settings.
30
34
@@ -101,6 +105,28 @@ You can deploy a ClickOnce application that uses default permissions for the Int
101
105
> [!NOTE]
102
106
> You can use the `ToXml` method of a permission set to generate the XML code for the application manifest. For example, to generate the XML for the <xref:System.Security.Permissions.EnvironmentPermission> permission set, call the <xref:System.Security.Permissions.EnvironmentPermission.ToXml%2A> method.
103
107
108
+
## Configure debugging for a security zone
109
+
110
+
You can specify security settings related to debugging in a zone.
111
+
112
+
1. With a project selected in **Solution Explorer**, on the **Project** menu, click **Properties**.
113
+
114
+
2. Click the **Security** tab.
115
+
116
+
3. Select the **Enable ClickOnce Security Settings** check box.
117
+
118
+
4. Select the **This is a partial trust application** option button.
119
+
120
+
5. Select **Advanced**.
121
+
122
+
6. Select **Grant the application access to its site of origin**
123
+
124
+
If you select this check box, the application can access the website or server share on which it is published. By default, this option is selected.
125
+
126
+
7. In the **Debug this application as if it were downloaded from the following URL** box, enter the URL.
127
+
128
+
If you need to allow the application to access the website or server share corresponding to the **Installation URL** you specified on the **Publish** page, enter that URL here.
Copy file name to clipboardExpand all lines: docs/deployment/how-to-install-prerequisites-with-a-clickonce-application.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,8 @@ title: Install prerequisites with a ClickOnce app
3
3
description: Select the appropriate prerequisite components for your configuration to package along with your ClickOnce application during installation.
Copy file name to clipboardExpand all lines: docs/deployment/how-to-specify-where-visual-studio-copies-the-files.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,10 @@
1
1
---
2
2
title: Specify ClickOnce Publish properties
3
3
description: Learn how to set the Publish properties for a ClickOnce application, such as the location where the application files and manifest are put, and the installation URL.
@@ -47,9 +49,9 @@ You can configure ClickOnce Publish properties on the **Publish** page of the **
47
49
48
50
## Specify a publishing location
49
51
50
-
When you publish an application by using ClickOnce, the `Publish Location` property specifies the location where the application files and manifest are put. This can be a file path or the path to an FTP server.
52
+
When you publish an application by using ClickOnce, the `Publish Location` property specifies the location where the application files and manifest are put. This can be a drive path (`C:\deploy\myapplication`), a file share (`\\server\myapplication`), or an FTP server (`ftp://ftp.microsoft.com/myapplication`). Note that text must be present in the **Publishing Location** box in order for the browse (**...**) button to work.
51
53
52
-
You can specify the `Publish Location` property on the **Publish** page of the **Project Designer**, or by using the Publish Wizard. For more information, see [How to: Publish a ClickOnce Application using the Publish Wizard](../deployment/how-to-publish-a-clickonce-application-using-the-publish-wizard.md).
54
+
You can specify the `Publish Location` property on the **Publish** page of the **Project Designer**, or by using the Publish Wizard. For more information, see [How to: Publish a ClickOnce Application using the Publish Wizard](../deployment/how-to-publish-a-clickonce-application-using-the-publish-wizard.md).
53
55
54
56
> [!NOTE]
55
57
> When you install more than one version of an application by using ClickOnce, the installation moves earlier versions of the application into a folder named Archive, in the publish location that you specify. Archiving earlier versions in this manner keeps the installation directory clear of folders from the earlier version.
@@ -118,6 +120,10 @@ The ClickOnce `Publish Version` property determines whether or not the applicati
118
120
119
121
The `Publish Version` property can be set on the **Publish** page of the **Project Designer**.
120
122
123
+
When the version number is changed, the application is published as an update. Each part of the publish version (**Major**, **Minor**, **Build**, **Revision**) can have a maximum value of 65535 (<xref:System.UInt16.MaxValue>), the maximum allowed by <xref:System.Version>.
124
+
125
+
When you install more than one version of an application by using ClickOnce, the installation moves earlier versions of the application into a folder named Archive, in the publish location that you specify. Archiving earlier versions in this manner keeps the installation directory clear of folders from the earlier version.
126
+
121
127
> [!NOTE]
122
128
> There's a project option that will automatically increment the `Publish Version` property each time the application is published; this option is enabled by default. For more information, see [Automatically Increment the ClickOnce Publish Version](../deployment/how-to-specify-where-visual-studio-copies-the-files.md#automatically-increment-the-clickonce-publish-version).
Copy file name to clipboardExpand all lines: docs/deployment/how-to-use-clickonce-to-deploy-applications-that-can-run-on-multiple-versions-of-the-dotnet-framework.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ ms.subservice: deployment
18
18
---
19
19
# Use ClickOnce to deploy applications that can run on multiple versions of the .NET Framework
20
20
21
-
You can deploy an application that targets multiple versions of the .NET Framework by using the ClickOnce deployment technology. This requires that you generate and update the application and deployment manifests.
21
+
You can deploy an application that targets multiple versions of the .NET Framework by using the ClickOnce deployment technology. This task requires that you generate and update the application and deployment manifests.
22
22
23
23
> [!NOTE]
24
24
> Before you change the application to target multiple versions of the .NET Framework, you should ensure that your application runs with multiple versions of the .NET Framework. The version common language runtime is different between .NET Framework 4 versus .NET Framework 2.0, .NET Framework 3.0, and .NET Framework 3.5.
@@ -39,7 +39,7 @@ You can deploy an application that targets multiple versions of the .NET Framewo
39
39
40
40
### To generate the application and deployment manifests
41
41
42
-
- Use the Publish Wizard or the Publish Page of the Project Designer to publish the application and generate the application and deployment manifest files. For more information, see [How to: Publish a ClickOnce application using the Publish Wizard](../deployment/how-to-publish-a-clickonce-application-using-the-publish-wizard.md) or [Publish Page, Project Designer](../ide/reference/publish-page-project-designer.md).
42
+
- Use the Publish Wizard or the Publish Page of the Project Designer to publish the application and generate the application and deployment manifest files. For more information, see [How to: Publish a ClickOnce application using the Publish Wizard](../deployment/how-to-publish-a-clickonce-application-using-the-publish-wizard.md) or [Specify ClickOnce Publish properties](../deployment/how-to-specify-where-visual-studio-copies-the-files.md).
@@ -78,13 +78,13 @@ You can deploy an application that targets multiple versions of the .NET Framewo
78
78
79
79
1. In the publish directory, open the application manifest by using the XML Editor in Visual Studio. The deployment manifest has the *.manifest* file name extension.
80
80
81
-
2. Add `group="framework"` to the dependency XML for the sentinel assemblies (`System.Core`, `WindowsBase`, `Sentinel.v3.5Client`, and `System.Data.Entity`). For example, the XML should look like the following:
81
+
2. Add `group="framework"` to the dependency XML for the sentinel assemblies (`System.Core`, `WindowsBase`, `Sentinel.v3.5Client`, and `System.Data.Entity`). The XML should appear similar to the following example:
3. Update the version number of the `<assemblyIdentity>` element for Microsoft.Windows.CommonLanguageRuntime to the version number for the .NET Framework that is the lowest common denominator. For example, if the application targets .NET Framework 3.5 and .NET Framework 4, use the 2.0.50727.0 version number and the XML should look like the following:
87
+
3. Update the version number of the `<assemblyIdentity>` element for Microsoft.Windows.CommonLanguageRuntime to the version number for the .NET Framework that is the lowest common denominator. For example, if the application targets .NET Framework 3.5 and .NET Framework 4, use the 2.0.50727.0 version number and the XML should appear as follows:
@@ -60,7 +61,7 @@ When publishing a ClickOnce application for the first time, publish properties c
60
61
To include files, exclude files, mark files as data files or prerequisites, and create groups of files for conditional installation in the Visual Studio UI, see [How to: Specify which files are published by ClickOnce](../deployment/how-to-specify-which-files-are-published-by-clickonce.md). You can also mark data files by using the Mage.exe. For more information, see [How to: Include a data file in a ClickOnce application](../deployment/how-to-include-a-data-file-in-a-clickonce-application.md).
61
62
62
63
### Prerequisites dialog box
63
-
This dialog box specifies which prerequisite components are installed, as well as how they are installed. For more information, see [How to: Install prerequisites with a ClickOnce application](../deployment/how-to-install-prerequisites-with-a-clickonce-application.md) and [Prerequisites dialog box](../ide/reference/prerequisites-dialog-box.md).
64
+
This dialog box specifies which prerequisite components are installed, as well as how they are installed. For more information, see [How to: Install prerequisites with a ClickOnce application](../deployment/how-to-install-prerequisites-with-a-clickonce-application.md).
64
65
65
66
### Application Updates dialog box
66
67
This dialog box specifies how the application installation should check for updates. For more information, see [How to: Manage updates for a ClickOnce application](../deployment/how-to-manage-updates-for-a-clickonce-application.md).
Copy file name to clipboardExpand all lines: docs/ide/how-to-sign-application-and-deployment-manifests.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,9 @@ description: Explore the signing requirements to publish ClickOnce application a
4
4
ms.date: 6/13/2024
5
5
ms.subservice: deployment
6
6
ms.topic: conceptual
7
+
f1_keywords:
8
+
- vb.ProjectPropertiesSigning
9
+
- vb.ProjectPropertiesSigning.PfxPasswordDialog
7
10
helpviewer_keywords:
8
11
- manifests [Visual Studio]
9
12
- code signing [Visual Studio], Authenticode
@@ -23,12 +26,12 @@ If you want to publish an application by using ClickOnce deployment, the applica
23
26
24
27
The information in this article applies only if you're using the .NET Framework 4.8.1 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).
25
28
26
-
For more information about ClickOnce deployment, see [ClickOnce security and deployment](../deployment/clickonce-security-and-deployment.md).
27
-
28
29
Signing the ClickOnce manifests is optional for *.exe*-based applications. For more information, see the "Generate unsigned manifests" section of this document.
29
30
30
31
For information about creating key files, see [How to: Create a public-private key pair](/dotnet/framework/app-domains/how-to-create-a-public-private-key-pair).
31
32
33
+
For information about signing assemblies and application manifests, see [Manage assembly and manifest signing](../ide/managing-assembly-and-manifest-signing.md).
34
+
32
35
> [!NOTE]
33
36
> Visual Studio supports only Personal Information Exchange (PFX) key files that have the *.pfx* extension. However, you can select other types of certificates from the current user's Windows certificate store by clicking **Select from Store** on the **Signing** page of project properties.
@@ -73,9 +79,8 @@ You can also point to a key you have already created. For more information about
73
79
74
80
If you only have access to a public key, you can use delay-signing to defer assigning the key. You enable delay signing by selecting the **Delay sign only** check box. A delay-signed project doesn't run, and you can't debug it. However, you can skip verification during development by using the [Sn.exe strong name tool](/dotnet/framework/tools/sn-exe-strong-name-tool) with the `-Vr` option.
75
81
76
-
For information about signing manifests, see [How to: Sign application and deployment manifests](../ide/how-to-sign-application-and-deployment-manifests.md).
0 commit comments