Skip to content

Repo sync for protected CLA branch #9568

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 30 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b06c5de
Link to VS caches on dev box article
anandmeg Aug 19, 2023
9bb12d4
Add link to windows enterprise image
anandmeg Aug 19, 2023
0304e6d
Add windows authentication broker workflow
anandmeg Aug 21, 2023
6ce3670
Add windows authentication broker workflow
anandmeg Aug 21, 2023
95e2ed9
update image
anandmeg Aug 21, 2023
77328cc
fix warnings
anandmeg Aug 21, 2023
0a6fdb8
fix link
anandmeg Aug 21, 2023
76b8dbc
fix build warning
anandmeg Aug 21, 2023
6a17a52
Explain precaching
anandmeg Aug 24, 2023
c2bf77c
Merge pull request #11607 from anandmeg/vs-devbox1
prmerger-automator[bot] Aug 24, 2023
3286b1d
Updates per feedback
anandmeg Aug 24, 2023
0a697f1
Switch to Vite from Vue CLI for ASP.NET Core app
Mikejo5000 Aug 24, 2023
36b27b3
minor edit
Mikejo5000 Aug 24, 2023
e740599
minor edit
Mikejo5000 Aug 24, 2023
9925d37
Merge pull request #11623 from Mikejo5000/mikejo-br21
prmerger-automator[bot] Aug 24, 2023
1a1a611
Move wam sections to 2022 moniker
anandmeg Aug 24, 2023
a7237ba
Switch ASP.NET Core with React app to Vite
Mikejo5000 Aug 24, 2023
08b639a
minor edit
Mikejo5000 Aug 24, 2023
769e97b
some fixes
anandmeg Aug 24, 2023
dc03dd8
Merge pull request #11620 from MicrosoftDocs/repo_sync_working_branch
PhilKang0704 Aug 24, 2023
aa791d2
Corrected section on verifying ports
Mikejo5000 Aug 24, 2023
0b90eb3
modified image
anandmeg Aug 24, 2023
665ec4a
Merge pull request #11624 from Mikejo5000/mikejo-br21
prmerger-automator[bot] Aug 24, 2023
044d9ee
update images
anandmeg Aug 24, 2023
908190c
Update React and Vue articles for Vite CLI output
Mikejo5000 Aug 24, 2023
48fd1a0
address feedback
anandmeg Aug 24, 2023
dd82461
Merge pull request #11625 from Mikejo5000/mikejo-br21
prmerger-automator[bot] Aug 24, 2023
5438139
rename png
anandmeg Aug 25, 2023
48eaf3f
fix png
anandmeg Aug 25, 2023
f5f6494
Merge pull request #11608 from anandmeg/vs-wam1
American-Dipper Aug 25, 2023
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
14 changes: 13 additions & 1 deletion docs/ide/advanced-feature-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Advanced features
description: Learn about the advanced features that might be more appropriate for experienced developers, or those developers who are already familiar with Visual Studio.
ms.custom: vs-acquisition
ms.date: 11/04/2021
ms.date: 8/19/2023
ms.topic: conceptual
author: anandmeg
ms.author: meghaanand
Expand Down Expand Up @@ -154,6 +154,18 @@ And, for a step-by-step tutorial on how to connect to a Git or Azure DevOps repo

::: moniker-end

::: moniker range=">=vs-2022"

## Optimize the Visual Studio experience on Microsoft Dev Box

> [!NOTE]
> This feature is currently in public preview. This information relates to a feature that may be substantially modified before it's released. Microsoft makes no warranties, expressed or implied, with respect to the information provided here.

With [Visual Studio 17.7 Preview 3](https://visualstudio.microsoft.com/vs/preview/), you can [pregenerate Visual Studio caches and include them in your dev box image](/azure/dev-box/how-to-generate-visual-studio-caches#enable-visual-studio-caches-in-dev-box-images). As a result, Visual Studio will load your solution and enable key IDE features faster on your dev box.
You can also improve the Git performance on large repositories by [enabling Git commit-graph optimizations in dev box images](/azure/dev-box/how-to-generate-visual-studio-caches#enable-git-commit-graph-optimizations-in-dev-box-images).

::: moniker-end

## Next steps

- If Visual Studio doesn't have the exact functionality you need, you can add it. Personalize the IDE based on your workflow and style, add support for external tools that aren't integrated with Visual Studio, and modify existing functionality to increase your productivity. For the latest version of the Visual Studio Extensibility Tools (VS SDK), see [Visual Studio SDK](../extensibility/visual-studio-sdk.md).
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/ide/quickstart-ide-orientation.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,3 +284,4 @@ We've looked at just a few of the features of Visual Studio to get acquainted wi
- [Overview of the Visual Studio IDE](../get-started/visual-studio-ide.md)
- [More features of Visual Studio](../ide/advanced-feature-overview.md)
- [Change theme and font colors](../ide/quickstart-personalize-the-ide.md)
- [Optimize the Visual Studio experience on Microsoft Dev Box](/azure/dev-box/how-to-generate-visual-studio-caches)
46 changes: 42 additions & 4 deletions docs/ide/work-with-multi-factor-authentication.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Multi-factor authentication with Visual Studio sign-ins
titleSuffix: ""
ms.date: 05/16/2023
ms.date: 08/24/2023
ms.topic: how-to
description: "Learn how to use Visual Studio with accounts that require multi-factor authentication (MFA)."
author: anandmeg
Expand All @@ -10,7 +10,6 @@ manager: jmartens
ms.technology: vs-ide-general
ms.workload:
- multiple
monikerRange: ">=vs-2019"
---

# Sign in to Visual Studio with accounts that require multi-factor authentication (MFA)
Expand All @@ -31,21 +30,60 @@ Versions of Visual Studio prior to 16.6 may have degraded authentication experie
These issues can cause your instance of Visual Studio to prompt reauthentication multiple times per day. You may have to re-enter your credentials for previously authenticated tenants, even during the course of the same Visual Studio session.

## Using Visual Studio with MFA policies
In the 16.6 release, we added new capabilities to Visual Studio 2019 that streamline how users can access resources secured via CA policies such as MFA. To use this enhanced workflow, you'll need to opt into using your system's default web browser as the mechanism to add and reauthenticate Visual Studio accounts.

::: moniker range="<=vs-2019"

You can access resources secured via CA policies such as MFA in Visual Studio. To use this enhanced workflow, you'll need to opt into using your system's default web browser as the mechanism to add and reauthenticate Visual Studio accounts.

::: moniker-end

::: moniker range="=vs-2022"

You can access resources secured via CA policies such as MFA in Visual Studio. To use this enhanced workflow, you'll need to opt into using your system's default web browser or the Windows authentication broker (available in [Visual Studio version 17.5](/visualstudio/releases/2022/release-notes-v17.5), but we recommend using [Visual Studio version 17.7](/visualstudio/releases/2022/release-notes) for an optimal experience) as the mechanism to add and reauthenticate Visual Studio accounts.

::: moniker-end

> [!WARNING]
> Not using this workflow could trigger a degraded experience resulting in multiple additional authentication prompts when adding or reauthenticating Visual Studio accounts.

::: moniker range="=vs-2022"

### Enabling Windows authentication broker

>[!NOTE]
>Web Account Manager(WAM) is only available on Windows 10 and above, as well as Windows Server 2019 and above.

To enable this workflow, go to Visual Studio's Options dialog **(Tools > Options…)**, select the **Accounts** tab, and then select **Windows authentication broker** from the **Add and reauthenticate accounts using:** dropdown.

:::image type="content" source="media/vs-2022/windows-authentication-broker.png" alt-text="Select web authentication broker from the dropdown.":::

Windows authentication broker uses [Web Account Manager(WAM)](/entra/msal/dotnet/acquiring-tokens/desktop-mobile/wam) and offers many benefits such as security, improved MFA support, and seamless integration between accounts added to the OS and Visual Studio.

::: moniker-end

### Enabling system web browser

> [!NOTE]
> For the best experience, we recommend that you clear your system’s default web browser data before proceeding with this workflow. Additionally, if you have Work or School accounts in your Windows 10 Settings under **Access work or school**, please verify that they are properly authenticated.

To enable this workflow, go to Visual Studio's Options dialog **(Tools > Options…)**, select the **Accounts** tab and pick **System web browser** under the **Add and reauthenticate accounts using:** dropdown.
To enable this workflow, go to Visual Studio's Options dialog **(Tools > Options…)**, select the **Accounts** tab and select **System web browser** from the **Add and reauthenticate accounts using:** dropdown.

:::image type="content" source="media/vs-2022/select-system-web-browser.png" alt-text="Select system web browser from the menu.":::

### Sign into additional accounts with MFA policies

::: moniker range="=vs-2022"

**Windows authentication broker**

Once the Windows authentication broker workflow is enabled, you can sign in or add accounts to Visual Studio as you normally would, via the Account Settings dialog **(File > Account Settings…)**. Web Account Manager(WAM) simplifies the sign in experience by allowing users to log in with accounts known to Windows, such as the account signed into your Windows session.

:::image type="content" source="media/vs-2022/add-personalization-account-web-account-manager.png" alt-text="Add additional accounts to Visual Studio with the Windows authentication broker workflow.":::

**System web browser**

::: moniker-end

Once the system web browser workflow is enabled, you can sign in or add accounts to Visual Studio as you normally would, via the Account Settings dialog **(File > Account Settings…)**.
</br>
:::image type="content" source="media/vs-2022/add-personalization-account.png" alt-text="Add a new personalization account to Visual Studio." border="false":::
Expand Down
4 changes: 3 additions & 1 deletion docs/install/using-visual-studio-vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Using Visual Studio on an Azure Virtual Machine
titleSuffix: ''
description: Learn how to use Visual Studio on an Azure Virtual Machine
ms.date: 07/26/2023
ms.date: 08/19/2023
ms.topic: conceptual
helpviewer_keywords:
- azure services
Expand Down Expand Up @@ -43,6 +43,8 @@ Images for the most recent major versions, Visual Studio 2022, Visual Studio 201

For more information, see the [Visual Studio Servicing Policy](/visualstudio/productinfo/vs-servicing-vs).

[Windows client for developers (Microsoft Dev Box compatible)](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/microsoftvisualstudio.windowsplustools?tab=Overview), a Windows 11 Enterprise image is meant to be used as a starting point for creating custom Dev Box images, and contains additional tools and settings to optimize the developer experience. This image doesn't include Visual Studio. For Visual Studio developers, we recommend using our [Visual Studio 2022](https://azuremarketplace.microsoft.com/marketplace/apps/microsoftvisualstudio.visualstudioplustools?exp=ubp8&tab=Overview) or [Visual Studio 2019](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/microsoftvisualstudio.visualstudio2019plustools?tab=Overview) Dev Box compatible images as a starting point.

## What features are installed?

Each image contains the recommended feature set for that Visual Studio edition. Generally, the installation includes:
Expand Down
33 changes: 21 additions & 12 deletions docs/javascript/tutorial-asp-net-core-with-react.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Create an ASP.NET Core app with React"
description: In this tutorial, you create an app using ASP.NET Core and React
ms.date: 04/25/2023
ms.date: 08/24/2023
ms.topic: tutorial
ms.devlang: javascript
author: mikejo5000
Expand All @@ -28,13 +28,13 @@ You can use the method described in this article to create ASP.NET Core Single P
- Create the client project based on the framework CLI installed on your computer

> [!NOTE]
> A simplified, updated template is available starting in Visual Studio 2022 version 17.5. This template creates two projects in the initial solution and eliminates several configuration steps compared to the previous template. This article describes the project creation process using the new template.
> A simplified, updated template is available starting in Visual Studio 2022 version 17.5. This template creates two projects in the initial solution and eliminates several configuration steps compared to the previous template. This article describes the project creation process using the template in Visual Studio 2022 version 17.7, which uses the Vite CLI.

## Prerequisites

Make sure to install the following:

- Visual Studio 2022 version 17.5 or later with the **ASP.NET and web development** workload installed. Go to the [Visual Studio downloads](https://visualstudio.microsoft.com/downloads/?cid=learn-onpage-download-cta) page to install it for free.
- Visual Studio 2022 version 17.7 or later with the **ASP.NET and web development** workload installed. Go to the [Visual Studio downloads](https://visualstudio.microsoft.com/downloads/?cid=learn-onpage-download-cta) page to install it for free.
If you need to install the workload and already have Visual Studio, go to **Tools** > **Get Tools and Features...**, which opens the Visual Studio Installer. Choose the **ASP.NET and web development** workload, then choose **Modify**.
- npm ([https://www.npmjs.com/](https://www.npmjs.com/package/npm)), which is included with Node.js
- npx ([https://www.npmjs.com/package/npx](https://www.npmjs.com/package/npx))
Expand All @@ -58,8 +58,7 @@ Make sure to install the following:
Compared to the [standalone React template](../javascript/tutorial-create-react-app.md), you see some new and modified files for integration with ASP.NET Core:

- aspnetcore-https.js
- aspnetcore-react.js
- setupProxy.js
- vite.config.js
- App.js (modified)
- App.test.js (modified)

Expand Down Expand Up @@ -87,7 +86,7 @@ Make sure to install the following:
To start the project, press **F5** or select the **Start** button at the top of the window. You will see two command prompts appear:

- The ASP.NET Core API project running
- npm running the react-scripts start command
- The Vite CLI showing a message such as `VITE v4.4.9 ready in 780 ms`

>[!NOTE]
> Check console output for messages, such as a message instructing you to update your version of Node.js.
Expand Down Expand Up @@ -152,7 +151,7 @@ Starting in Visual Studio 2022 version 17.3, you can publish the integrated solu
You may see the following error:

```cmd
[HPM] Error occurred while trying to proxy request /weatherforecast from localhost:4200 to https://localhost:5001 (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
[HPM] Error occurred while trying to proxy request /weatherforecast from localhost:4200 to https://localhost:7183 (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
```

If you see this issue, most likely the frontend started before the backend. Once you see the backend command prompt up and running, just refresh the React App in the browser.
Expand All @@ -161,16 +160,26 @@ If you see this issue, most likely the frontend started before the backend. Once

If the weather data does not load correctly, you may also need to verify that your ports are correct.

1. Make sure that the port numbers match. Go to the *launchSettings.json* file in your ASP.NET Core project (in the *Properties* folder). Get the port number from the `applicationUrl` property.
1. Make sure that the port numbers match. Go to the *launchSettings.json* file in your ASP.NET Core **webapi** project (in the *Properties* folder). Get the port number from the `applicationUrl` property.

If there are multiple `applicationUrl` properties, look for one using an `https` endpoint. It should look similar to `https://localhost:7049`.
If there are multiple `applicationUrl` properties, look for one using an `https` endpoint. It should look similar to `https://localhost:7183`.

1. Then, go to the *setupProxy.js* file for your React project (look in the *src* folder). Update the target property to match the `applicationUrl` property in *launchSettings.json*. When you update it, that value should look similar to this:
1. Then, go to the *vite.config.js* file for your React project. Update the `target` property to match the `applicationUrl` property in *launchSettings.json*. When you update it, that value should look similar to this:

```js
target: 'https://localhost:7049',
target: 'https://localhost:7183/',
```

### Privacy error

You may see the following certificate error:

```
Your connection isn't private
```

Try deleting the React certificates from *%appdata%\local\asp.net\https* or *%appdata%\roaming\asp.net\https*, and then retry.

## Next steps

For more information about SPA applications in ASP.NET Core, see the React section under [Developing Single Page Apps](/aspnet/core/client-side/spa/intro#developing-single-page-apps). The linked article provides additional context for project files such as *aspnetcore-https.js*, *aspnetcore-react.js*, and *setupProxy.js*, although details of the implementation are different based on the template differences. For example, instead of a ClientApp folder, the React files are contained in a separate project.
For more information about SPA applications in ASP.NET Core, see the React section under [Developing Single Page Apps](/aspnet/core/client-side/spa/intro#developing-single-page-apps). The linked article provides additional context for project files such as *aspnetcore-https.js*, although details of the implementation are different based on the template differences. For example, instead of a ClientApp folder, the React files are contained in a separate project.
Loading