Skip to content

Repo sync for protected CLA branch #8458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Sep 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
452d822
Add details for supported web and load test functionality supported i…
Mikejo5000 Sep 1, 2022
eaed3ba
Merge branch 'main' of https://github.com/MicrosoftDocs/visualstudio-…
Mikejo5000 Sep 2, 2022
799fbfe
SEO edits
Mikejo5000 Sep 2, 2022
3e12369
Link updates and minor edits
Mikejo5000 Sep 2, 2022
2de909a
restructured landing page
Mikejo5000 Sep 2, 2022
57caf6b
Merge branch 'main' of https://github.com/Microsoft/visualstudio-docs…
Mikejo5000 Sep 7, 2022
41721c0
Added note about ApplicationDeployment API
Mikejo5000 Sep 7, 2022
f720794
Added Includes
Mikejo5000 Sep 7, 2022
8b77998
Added namespace info to the include
Mikejo5000 Sep 8, 2022
497b89e
Added include based on search for System.Deployment.Application names…
Mikejo5000 Sep 8, 2022
2d8e6ae
tweak
Mikejo5000 Sep 8, 2022
fc2b063
incorporated feedback
Mikejo5000 Sep 9, 2022
82c077c
acrolinx edits
Mikejo5000 Sep 9, 2022
051deb7
Adding clarification that VSPIX is not supported on ARM64
davidcongruili Sep 9, 2022
88562e0
Adding clarification that VSPIX is not supported on ARM64
davidcongruili Sep 9, 2022
58161ee
Added metadata
Mikejo5000 Sep 12, 2022
0c31664
Merge pull request #10391 from MicrosoftDocs/mikejo-br16
v-regandowner Sep 12, 2022
cabf595
Merge pull request #10399 from MicrosoftDocs/repo_sync_working_branch
huypub Sep 12, 2022
3a00e25
Merge pull request #10396 from davidcongruili/arm64-vspix
prmerger-automator[bot] Sep 12, 2022
008852e
Merge pull request #10397 from davidcongruili/arm64-vspix2
prmerger-automator[bot] Sep 12, 2022
3ba8983
Merging changes synced from https://github.com/MicrosoftDocs/visualst…
opbld17 Sep 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ms.workload:
[!INCLUDE [Visual Studio](~/includes/applies-to-version/vs-windows-only.md)]
>[!NOTE]
> Visual Studio recommends PIX on Windows for DirectX 12 games. [PIX on Windows](https://aka.ms/PIXonWindows) is a performance tuning and debugging tool that fully supports DirectX 12. [Find out more information](visual-studio-graphics-diagnostics-directx-12.md) or [download here](https://aka.ms/downloadPIX).
> Visual Studio Graphics Diagnostics is not supported on ARM64 Visual Studio

Visual Studio *Graphics Diagnostics* is a set of tools for recording and then analyzing rendering and performance problems in Direct3D apps. Graphics Diagnostics can be used on apps that are running locally on your Windows PC, in a Windows device emulator, or on a remote PC or device.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ Most applications consume or produce data. [!INCLUDE[ndptecclick](../deployment/

After your application has these permissions, it can access the Data Directory by using method calls on classes within the <xref:System.IO>. You can obtain the path of the Data Directory within a Windows Forms [!INCLUDE[ndptecclick](../deployment/includes/ndptecclick_md.md)] application by using the <xref:System.Deployment.Application.ApplicationDeployment.DataDirectory%2A> property defined on the <xref:System.Deployment.Application.ApplicationDeployment.CurrentDeployment%2A> property of <xref:System.Deployment.Application.ApplicationDeployment>. This is the most convenient and recommended way to access your data. The following code example demonstrates how to do this for a text file named *CSV.txt* that you have included in your deployment as a data file.

[!INCLUDE[ndptecclick](../deployment/includes/dotnet-support-application-deployment-api.md)]

### [C#](#tab/csharp)
:::code language="csharp" source="../snippets/csharp/VS_Snippets_Winforms/ClickOnce.OpenDataFile/CS/Form1.cs" id="Snippet1":::

Expand Down
2 changes: 2 additions & 0 deletions docs/deployment/choosing-a-clickonce-update-strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ ms.workload:
## Provide a user interface for updates
When using this strategy, the application developer provides a user interface that enables the user to choose when or how often the application will check for updates. For example, you might provide a "Check for Updates Now" command, or an "Update Settings" dialog box that has choices for different update intervals. The [!INCLUDE[ndptecclick](../deployment/includes/ndptecclick_md.md)] deployment APIs provide a framework for programming your own update user interface. For more information, see the <xref:System.Deployment.Application> namespace.

[!INCLUDE[ndptecclick](../deployment/includes/dotnet-support-application-deployment-api.md)]

If your application uses deployment APIs to control its own update logic, you should block update checking as described in "Blocking Update Checking" in the following section.

This strategy works best when you need different update strategies for different users.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ This section contains sample applications, example code, and step-by-step walkth
|[Download assemblies on demand with the ClickOnce deployment API](../deployment/walkthrough-downloading-assemblies-on-demand-with-the-clickonce-deployment-api.md)|Demonstrates how to mark certain assemblies in your application as "optional," and how to download them using classes in the <xref:System.Deployment.Application> namespace.|
|[Download assemblies on demand with the ClickOnce deployment API using the designer](../deployment/walkthrough-downloading-assemblies-on-demand-with-the-clickonce-deployment-api-using-the-designer.md)|Explains how to download application assemblies only when they are first used by the application.|

[!INCLUDE[ndptecclick](../deployment/includes/dotnet-support-application-deployment-api.md)]

## See also

- [Visual Studio walkthroughs](/previous-versions/szatc41e(v=vs.110))
2 changes: 2 additions & 0 deletions docs/deployment/clickonce-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ The following pages describe the structure of the XML files used to represent Cl

Provides links to reference documentation of the public classes that support ClickOnce within managed code.

[!INCLUDE[ndptecclick](../deployment/includes/dotnet-support-application-deployment-api.md)]

[Publish ClickOnce applications](../deployment/publishing-clickonce-applications.md)

Provides walkthroughs and how-to's that perform ClickOnce tasks.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ms.workload:
# Debug ClickOnce applications that use System.Deployment.Application

[!INCLUDE [Visual Studio](~/includes/applies-to-version/vs-windows-only.md)]
In [!INCLUDE[vs_current_short](../code-quality/includes/vs_current_short_md.md)], [!INCLUDE[ndptecclick](../deployment/includes/ndptecclick_md.md)] deployment allows you to configure how an application is updated. However, if you need to use and customize advanced [!INCLUDE[ndptecclick](../deployment/includes/ndptecclick_md.md)] deployment features, you will need to access the deployment object model provided by <xref:System.Deployment.Application>. You can use the <xref:System.Deployment.Application> APIs for advanced tasks such as:
In [!INCLUDE[vs_current_short](../code-quality/includes/vs_current_short_md.md)], [!INCLUDE[ndptecclick](../deployment/includes/ndptecclick_md.md)] deployment allows you to configure how an application is updated. However, if you need to use and customize advanced [!INCLUDE[ndptecclick](../deployment/includes/ndptecclick_md.md)] deployment features, you'll need to access the deployment object model provided by <xref:System.Deployment.Application>. You can use the <xref:System.Deployment.Application> APIs for advanced tasks such as:

- Creating an "Update Now" option in your application

Expand All @@ -38,15 +38,17 @@ In [!INCLUDE[vs_current_short](../code-quality/includes/vs_current_short_md.md)]

The recommended debugging technique is as follows:

1. Before you start, make sure the symbol (.pdb) and source files are archived.
[!INCLUDE[ndptecclick](../deployment/includes/dotnet-support-application-deployment-api.md)]

1. Before you start, make sure the symbol (.pdb) files and source files are archived.

2. Deploy version 1 of the application.

3. Create a new blank solution. From the **File** menu, click **New**, then **Project**. In the **New Project** dialog box, open the **Other Project Types** node, then select the **Visual Studio Solutions** folder. In the **Templates** pane, select **Blank Solution**.

4. Add the archived source location to the properties for this new solution. In **Solution Explorer**, right-click the solution node, then click **Properties**. In the **Property Pages** dialog box, select **Debug Source Files**, then add the directory of the archived source code. Otherwise, the debugger will find the out-of-date source files, since the source file paths are recorded in the .pdb file. If the debugger uses out-of-date source files, you see a message telling you that the source does not match.
4. Add the archived source location to the properties for this new solution. In **Solution Explorer**, right-click the solution node, then click **Properties**. In the **Property Pages** dialog box, select **Debug Source Files**, then add the directory of the archived source code. Otherwise, the debugger will find the out-of-date source files, since the source file paths are recorded in the .pdb file. If the debugger uses out-of-date source files, you see a message telling you that the source doesn't match.

5. Make sure the debugger can find the *.pdb* files. If you have deployed them with your application, the debugger finds them automatically. It always looks next to the assembly in question first. Otherwise, you will need to add the archive path to the **Symbol file (.pdb) locations** (to access this option, from the **Tools** menu, click **Options**, then open the **Debugging** node, and click **Symbols**).
5. Make sure the debugger can find the *.pdb* files. If you've deployed them with your application, the debugger finds them automatically. It always looks next to the assembly in question first. Otherwise, you'll need to add the archive path to the **Symbol file (.pdb) locations** (to access this option, from the **Tools** menu, click **Options**, then open the **Debugging** node, and click **Symbols**).

6. Debug what happens between the `CheckForUpdate` and `Download`/`Update` method calls.

Expand All @@ -69,11 +71,11 @@ In [!INCLUDE[vs_current_short](../code-quality/includes/vs_current_short_md.md)]

7. Deploy version 2.

8. Attempt to attach the debugger to the version 1 application as it downloads an update for version 2. Alternatively you can use the `System.Diagnostics.Debugger.Break` method or simply `Stop` in Visual Basic. Of course, you should not leave these method calls in production code.
8. Attempt to attach the debugger to the version 1 application while it downloads an update for version 2. Alternatively, you can use the `System.Diagnostics.Debugger.Break` method or simply `Stop` in Visual Basic. Of course, you should not leave these method calls in production code.

For example, assume you are developing a Windows Forms application, and you have an event handler for this method with the update logic in it. To debug this, simply attach before the button is pressed, then set a breakpoint (make sure that you open the appropriate archived file and set the breakpoint there).

Use the <xref:System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed%2A> property to invoke the <xref:System.Deployment.Application> APIs only when the application is deployed; the APIs should not be invoked during debugging in [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)].
Use the <xref:System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed%2A> property to invoke the <xref:System.Deployment.Application> APIs only when the application is deployed; the APIs shouldn't be invoked during debugging in [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)].

## See also
- <xref:System.Deployment.Application>
2 changes: 2 additions & 0 deletions docs/deployment/deployment-element-clickonce-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ Identifies the attributes used for the deployment of updates and exposure to the

To disable checking for updates, remove the `subscription` element. When you specify in the deployment manifest to never scan for updates, you can still manually check for updates by using the <xref:System.Deployment.Application.ApplicationDeployment.CheckForUpdate%2A> method.

[!INCLUDE[ndptecclick](../deployment/includes/dotnet-support-application-deployment-api.md)]

For more information on how deploymentProvider relates to updates, see [Choosing a ClickOnce Update Strategy](../deployment/choosing-a-clickonce-update-strategy.md).

## Examples
Expand Down
2 changes: 2 additions & 0 deletions docs/deployment/how-clickonce-performs-application-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ ClickOnce uses the file version information specified in an application's deploy

File patching also works for assemblies that are downloaded on demand using the <xref:System.Deployment.Application.ApplicationDeployment.DownloadFileGroup%2A> and <xref:System.Deployment.Application.ApplicationDeployment.DownloadFileGroupAsync%2A> methods.

[!INCLUDE[ndptecclick](../deployment/includes/dotnet-support-application-deployment-api.md)]

If you use Visual Studio to compile your application, it will generate new hash signatures for all files whenever you rebuild the entire project. In this case, all assemblies will be downloaded to the client, although only a few assemblies may have changed.

File patching does not work for files that are marked as data and stored in the data directory. These are always downloaded regardless of the file's hash signature. For more information on the data directory, see [Access local and remote data in ClickOnce applications](../deployment/accessing-local-and-remote-data-in-clickonce-applications.md).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ ms.workload:
[!INCLUDE [Visual Studio](~/includes/applies-to-version/vs-windows-only.md)]
ClickOnce provides two ways to update an application once it is deployed. In the first method, you can configure the ClickOnce deployment to check automatically for updates at certain intervals. In the second method, you can write code that uses the <xref:System.Deployment.Application.ApplicationDeployment> class to check for updates based on an event, such as a user request.

[!INCLUDE[ndptecclick](../deployment/includes/dotnet-support-application-deployment-api.md)]

The following procedures show some code for performing a programmatic update and also describe how to configure your ClickOnce deployment to enable programmatic update checks.

In order to update a ClickOnce application programmatically, you must specify a location for updates. This is sometimes referred to as a deployment provider. For more information on setting this property, see [Choose a ClickOnce update strategy](../deployment/choosing-a-clickonce-update-strategy.md).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ ms.workload:

You can configure the application to check for updates programmatically based on an event such as a user request. The procedure "To check for updates programmatically" in this topic shows how you would write code that uses the <xref:System.Deployment.Application.ApplicationDeployment> class to check for updates based on an event.

[!INCLUDE[ndptecclick](../deployment/includes/dotnet-support-application-deployment-api.md)]

You can also deploy your application from one location and update it from another. See the procedure "To specify a different update location."

For more information, see [Choosing a ClickOnce Update Strategy](../deployment/choosing-a-clickonce-update-strategy.md).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ The *query string* is the portion of a URL beginning with a question mark (?) th

1. Place the following code in your project. In order for this code to function, you will have to have a reference to System.Web and add `using` or `Imports` directives for System.Web, System.Collections.Specialized, and System.Deployment.Application.

[!INCLUDE[ndptecclick](../deployment/includes/dotnet-support-application-deployment-api.md)]

### [C#](#tab/csharp)
:::code language="csharp" source="../snippets/csharp/VS_Snippets_Winforms/ClickOnceQueryString/CS/Form1.cs" id="Snippet1":::

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Visual Studio .NET 5+ ClickOnce API support
author: mikejo5000
description: Learn about .NET 5+ ClickOnce API support in ClickOnce
ms.author: mikejo
ms.date: 09/12/2022
ms.technology: vs-ide-deployment
ms.topic: include
---

> [!NOTE]
> The <xref:System.Deployment.Application.ApplicationDeployment> class and APIs in the <xref:System.Deployment.Application> namespace are not supported in .NET 5+.
2 changes: 2 additions & 0 deletions docs/deployment/localizing-clickonce-applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ Localization is the process of making your application appropriate for a specifi
## Download satellite assemblies on demand
If you decide to include all satellite assemblies in a single deployment, you can improve performance by using on-demand downloading, which enables you to mark assemblies as optional. The marked assemblies will not be downloaded when the application is installed or updated. You can install the assemblies when you need them by calling the <xref:System.Deployment.Application.ApplicationDeployment.DownloadFileGroup%2A> method on the <xref:System.Deployment.Application.ApplicationDeployment> class.

[!INCLUDE[ndptecclick](../deployment/includes/dotnet-support-application-deployment-api.md)]

Downloading satellite assemblies on demand differs slightly from downloading other types of assemblies on demand. For more information and code examples on how to enable this scenario using the [!INCLUDE[winsdkshort](../debugger/debug-interface-access/includes/winsdkshort_md.md)] tools for [!INCLUDE[ndptecclick](../deployment/includes/ndptecclick_md.md)], see [Walkthrough: Downloading Satellite Assemblies on Demand with the ClickOnce Deployment API](../deployment/walkthrough-downloading-satellite-assemblies-on-demand-with-the-clickonce-deployment-api.md).

You can also enable this scenario in [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)]. Also see [Walkthrough: Downloading Satellite Assemblies on Demand with the ClickOnce Deployment API Using the Designer](/previous-versions/visualstudio/visual-studio-2012/ms366788(v=vs.110)) or [Walkthrough: Downloading Satellite Assemblies on Demand with the ClickOnce Deployment API Using the Designer](/previous-versions/visualstudio/visual-studio-2013/ms366788(v=vs.120)).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ ms.workload:
[!INCLUDE [Visual Studio](~/includes/applies-to-version/vs-windows-only.md)]
Any ClickOnce application based on an *.exe* file can be silently installed and updated by a custom installer. A custom installer can implement custom user experience during installation, including custom dialog boxes for security and maintenance operations. To perform installation operations, the custom installer uses the <xref:System.Deployment.Application.InPlaceHostingManager> class. This walkthrough demonstrates how to create a custom installer that silently installs a ClickOnce application.

[!INCLUDE[ndptecclick](../deployment/includes/dotnet-support-application-deployment-api.md)]

## Prerequisites

### To create a custom ClickOnce application installer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ ms.workload:
[!INCLUDE [Visual Studio](~/includes/applies-to-version/vs-windows-only.md)]
By default, all the assemblies included in a [!INCLUDE[ndptecclick](../deployment/includes/ndptecclick_md.md)] application are downloaded when the application is first run. However, there might be parts of your application that are used by a small set of the users. In this case, you want to download an assembly only when you create one of its types. The following walkthrough demonstrates how to mark certain assemblies in your application as "optional", and how to download them by using classes in the <xref:System.Deployment.Application> namespace when the common language runtime demands them.

[!INCLUDE[ndptecclick](../deployment/includes/dotnet-support-application-deployment-api.md)]

> [!NOTE]
> Your application will have to run in full trust to use this procedure.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ ms.workload:
[!INCLUDE [Visual Studio](~/includes/applies-to-version/vs-windows-only.md)]
By default, all of the assemblies included in a [!INCLUDE[ndptecclick](../deployment/includes/ndptecclick_md.md)] application are downloaded when the application is first run. However, you may have parts of your application that are used by a small set of your users. In this case, you want to download an assembly only when you create one of its types. The following walkthrough demonstrates how to mark certain assemblies in your application as "optional", and how to download them by using classes in the <xref:System.Deployment.Application> namespace when the common language runtime (CLR) demands them.

[!INCLUDE[ndptecclick](../deployment/includes/dotnet-support-application-deployment-api.md)]

> [!NOTE]
> Your application will have to run in full trust to use this procedure.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Windows Forms applications can be configured for multiple cultures through the u

This walkthrough demonstrates how to mark your satellite assemblies as optional, and download only the assembly a client machine needs for its current culture settings.

[!INCLUDE[ndptecclick](../deployment/includes/dotnet-support-application-deployment-api.md)]

> [!NOTE]
> For testing purposes, the following code examples programmatically set the culture to `ja-JP`. See the "Next Steps" section later in this topic for information on how to adjust this code for a production environment.

Expand Down
Loading