Skip to content

Commit

Permalink
Blazor 3.1 Preview Updates (#15111)
Browse files Browse the repository at this point in the history
* Blazor 3.1 Preview Updates

* React to feedback

* React to feedback

* Fix list
  • Loading branch information
guardrex committed Oct 15, 2019
1 parent 5d6eba2 commit 9f4646a
Show file tree
Hide file tree
Showing 16 changed files with 129 additions and 20 deletions.
2 changes: 1 addition & 1 deletion aspnetcore/blazor/call-web-api.md
Expand Up @@ -5,7 +5,7 @@ description: Learn how to call a web API from a Blazor app using JSON helpers, i
monikerRange: '>= aspnetcore-3.0'
ms.author: riande
ms.custom: mvc
ms.date: 10/05/2019
ms.date: 10/15/2019
uid: blazor/call-web-api
---
# Call a web API from ASP.NET Core Blazor
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/blazor/debug.md
Expand Up @@ -5,7 +5,7 @@ description: Learn how to debug Blazor apps.
monikerRange: '>= aspnetcore-3.0'
ms.author: riande
ms.custom: mvc
ms.date: 09/23/2019
ms.date: 10/15/2019
uid: blazor/debug
---
# Debug ASP.NET Core Blazor
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/blazor/dependency-injection.md
Expand Up @@ -5,7 +5,7 @@ description: See how Blazor apps can inject services into components.
monikerRange: '>= aspnetcore-3.0'
ms.author: riande
ms.custom: mvc
ms.date: 09/23/2019
ms.date: 10/15/2019
uid: blazor/dependency-injection
---
# ASP.NET Core Blazor dependency injection
Expand Down
119 changes: 114 additions & 5 deletions aspnetcore/blazor/get-started.md
Expand Up @@ -5,7 +5,7 @@ description: Get started with Blazor by building a Blazor app with the tooling o
monikerRange: '>= aspnetcore-3.0'
ms.author: riande
ms.custom: mvc
ms.date: 09/25/2019
ms.date: 10/15/2019
uid: blazor/get-started
---
# Get started with ASP.NET Core Blazor
Expand All @@ -16,19 +16,21 @@ By [Daniel Roth](https://github.com/danroth27) and [Luke Latham](https://github.

Get started with Blazor:

1. Install the latest [.NET Core 3.0 SDK](https://dotnet.microsoft.com/download/dotnet-core/3.0) release.
::: moniker range=">= aspnetcore-3.1"

1. Install the [.NET Core 3.1 Preview SDK](https://dotnet.microsoft.com/download/dotnet-core/3.1).

1. Install the [Blazor WebAssembly](xref:blazor/hosting-models#blazor-webassembly) template by running the following command in a command shell:
1. Install the [Blazor WebAssembly](xref:blazor/hosting-models#blazor-webassembly) template by running the following command in a command shell. The [Microsoft.AspNetCore.Blazor.Templates](https://www.nuget.org/packages/Microsoft.AspNetCore.Blazor.Templates/) package has a preview version while Blazor WebAssembly is in preview.

```dotnetcli
dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.0.0-preview9.19465.2
dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.1.0-preview1.19508.20
```

1. Follow the guidance for your choice of tooling:

# [Visual Studio](#tab/visual-studio)

1\. Install the latest [Visual Studio](https://visualstudio.com/vs/) with the **ASP.NET and web development** workload.
1\. Install [Visual Studio 16.4 Preview 2 or later](https://visualstudio.microsoft.com/vs/preview/) with the **ASP.NET and web development** workload.

2\. Create a new project.

Expand Down Expand Up @@ -115,6 +117,113 @@ Get started with Blazor:

---

::: moniker-end

::: moniker range="< aspnetcore-3.1"

1. Install the latest [.NET Core 3.0 SDK](https://dotnet.microsoft.com/download/dotnet-core/3.0) release.

1. Optionally install the [Blazor WebAssembly](xref:blazor/hosting-models#blazor-webassembly) template by installing the [.NET Core 3.1 Preview SDK](https://dotnet.microsoft.com/download/dotnet-core/3.1) and then running the following command in a command shell:

```dotnetcli
dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.0.0-preview9.19465.2
```

1. Follow the guidance for your choice of tooling:

# [Visual Studio](#tab/visual-studio)

1\. Install the latest [Visual Studio](https://visualstudio.com/vs/) with the **ASP.NET and web development** workload.

2\. Optionally install [Visual Studio 16.4 Preview 2 or later](https://visualstudio.microsoft.com/vs/preview/) with the **ASP.NET and web development** workload for Blazor WebAssembly app development.

3\. Create a new project.

4\. Select **Blazor App**. Select **Next**.

5\. Provide a project name in the **Project name** field or accept the default project name. Confirm the **Location** entry is correct or provide a location for the project. Select **Create**.

6\. For a Blazor WebAssembly experience, choose the **Blazor WebAssembly App** template. For a Blazor Server experience, choose the **Blazor Server App** template. Select **Create**. For information on the two Blazor hosting models, *Blazor Server* and *Blazor WebAssembly*, see <xref:blazor/hosting-models>.

7\. Press **F5** to run the app.

> [!NOTE]
> If you installed the Blazor Visual Studio extension for a prior preview release of ASP.NET Core Blazor (Preview 6 or earlier), you can uninstall the extension. Installing the Blazor templates in a command shell is now sufficient to surface the templates in Visual Studio.
# [Visual Studio Code](#tab/visual-studio-code)

1\. Install [Visual Studio Code](https://code.visualstudio.com/).

2\. Install the latest [C# for Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp).

3\. For a Blazor WebAssembly experience, execute the following command in a command shell:

```dotnetcli
dotnet new blazorwasm -o WebApplication1
```

For a Blazor Server experience, execute the following command in a command shell:

```dotnetcli
dotnet new blazorserver -o WebApplication1
```

For information on the two Blazor hosting models, *Blazor Server* and *Blazor WebAssembly*, see <xref:blazor/hosting-models>.

4\. Open the *WebApplication1* folder in Visual Studio Code.

5\. For a Blazor Server project, the IDE requests that you add assets to build and debug the project. Select **Yes**.

6\. If using a Blazor Server app, run the app using the Visual Studio Code debugger. If using a Blazor WebAssembly app, execute `dotnet run` from the app's project folder.

7\. In a browser, navigate to `https://localhost:5001`.

<!--
# [Visual Studio for Mac](#tab/visual-studio-mac)
1\. Install [Visual Studio for Mac](https://visualstudio.microsoft.com/vs/mac/). Switch the [Update channel to Preview](/visualstudio/mac/install-preview).
2\. Select **File** > **New Solution** or **New Project**.
3\. In the sidebar, select **.NET Core** > **App**.
4\. For a Blazor Server experience, select the **Blazor Server App** template. For a Blazor WebAssembly experience, select the **Blazor WebAssembly App** template. Select **Next**. For information on the two Blazor hosting models, *Blazor Server* and *Blazor WebAssembly*, see <xref:blazor/hosting-models>.
5\. The **Target Framework** defaults to **.NET Core 3.0**. Select **Next**.
6\. In the **Project Name** field, enter `WebApplication1`. Select **Create**.
7\. Select **Run** > **Run Without Debugging** to run the app *without the debugger*. Running with the debugger isn't supported at this time.
-->

# [.NET Core CLI](#tab/netcore-cli/)

For a Blazor WebAssembly experience, execute the following commands in a command shell:

```dotnetcli
dotnet new blazorwasm -o WebApplication1
cd WebApplication1
dotnet run
```

For a Blazor Server experience, execute the following commands in a command shell:

```dotnetcli
dotnet new blazorserver -o WebApplication1
cd WebApplication1
dotnet run
```

For information on the two Blazor hosting models, *Blazor Server* and *Blazor WebAssembly*, see <xref:blazor/hosting-models>.

In a browser, navigate to `https://localhost:5001`.

---

::: moniker-end

Multiple pages are available from tabs in the sidebar:

* Home
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/blazor/hosting-models.md
Expand Up @@ -5,7 +5,7 @@ description: Understand Blazor WebAssembly and Blazor Server hosting models.
monikerRange: '>= aspnetcore-3.0'
ms.author: riande
ms.custom: mvc
ms.date: 10/03/2019
ms.date: 10/15/2019
uid: blazor/hosting-models
---
# ASP.NET Core Blazor hosting models
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/blazor/index.md
Expand Up @@ -5,7 +5,7 @@ description: Explore ASP.NET Core Blazor, a way to build interactive client-side
monikerRange: '>= aspnetcore-3.0'
ms.author: riande
ms.custom: "mvc, seoapril2019"
ms.date: 10/03/2019
ms.date: 10/15/2019
uid: blazor/index
---
# Introduction to ASP.NET Core Blazor
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/blazor/javascript-interop.md
Expand Up @@ -5,7 +5,7 @@ description: Learn how to invoke JavaScript functions from .NET and .NET methods
monikerRange: '>= aspnetcore-3.0'
ms.author: riande
ms.custom: mvc
ms.date: 09/23/2019
ms.date: 10/15/2019
uid: blazor/javascript-interop
---
# ASP.NET Core Blazor JavaScript interop
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/blazor/routing.md
Expand Up @@ -5,7 +5,7 @@ description: Learn how to route requests in apps and about the NavLink component
monikerRange: '>= aspnetcore-3.0'
ms.author: riande
ms.custom: mvc
ms.date: 10/09/2019
ms.date: 10/15/2019
uid: blazor/routing
---
# ASP.NET Core Blazor routing
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/blazor/state-management.md
Expand Up @@ -5,7 +5,7 @@ description: Learn how to persist state in Blazor Server apps.
monikerRange: '>= aspnetcore-3.0'
ms.author: riande
ms.custom: mvc
ms.date: 09/23/2019
ms.date: 10/15/2019
uid: blazor/state-management
---
# ASP.NET Core Blazor state management
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/blazor/supported-platforms.md
Expand Up @@ -5,7 +5,7 @@ description: Learn about the supported platforms for ASP.NET Core Blazor.
monikerRange: '>= aspnetcore-3.0'
ms.author: riande
ms.custom: mvc
ms.date: 09/23/2019
ms.date: 10/15/2019
uid: blazor/supported-platforms
---
# ASP.NET Core Blazor supported platforms
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/host-and-deploy/blazor/configure-linker.md
Expand Up @@ -5,7 +5,7 @@ description: Learn how to control the Intermediate Language (IL) Linker when bui
monikerRange: '>= aspnetcore-3.0'
ms.author: riande
ms.custom: mvc
ms.date: 09/23/2019
ms.date: 10/15/2019
uid: host-and-deploy/blazor/configure-linker
---
# Configure the Linker for ASP.NET Core Blazor
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/host-and-deploy/blazor/index.md
Expand Up @@ -5,7 +5,7 @@ description: Discover how to host and deploy Blazor apps.
monikerRange: '>= aspnetcore-3.0'
ms.author: riande
ms.custom: mvc
ms.date: 09/23/2019
ms.date: 10/15/2019
uid: host-and-deploy/blazor/index
---
# Host and deploy ASP.NET Core Blazor
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/host-and-deploy/blazor/webassembly.md
Expand Up @@ -5,7 +5,7 @@ description: Learn how to host and deploy a Blazor app using ASP.NET Core, Conte
monikerRange: '>= aspnetcore-3.0'
ms.author: riande
ms.custom: mvc
ms.date: 10/07/2019
ms.date: 10/15/2019
uid: host-and-deploy/blazor/webassembly
---
# Host and deploy ASP.NET Core Blazor WebAssembly
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/includes/blazorwasm-preview-notice.md
@@ -1,4 +1,4 @@
> [!IMPORTANT]
> **Blazor WebAssembly in preview**
>
> *Blazor Server* is supported in ASP.NET Core 3.0. *Blazor WebAssembly* is in preview.
> *Blazor Server* is supported in ASP.NET Core 3.0. *Blazor WebAssembly* is in preview for ASP.NET Core 3.1.
2 changes: 1 addition & 1 deletion aspnetcore/security/blazor/index.md
Expand Up @@ -5,7 +5,7 @@ description: Learn about Blazor authentication and authorization scenarios.
monikerRange: '>= aspnetcore-3.0'
ms.author: riande
ms.custom: mvc
ms.date: 10/05/2019
ms.date: 10/15/2019
uid: security/blazor/index
---
# ASP.NET Core Blazor authentication and authorization
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/tutorials/build-your-first-blazor-app.md
Expand Up @@ -5,7 +5,7 @@ description: Build a Blazor app step-by-step.
monikerRange: '>= aspnetcore-3.0'
ms.author: riande
ms.custom: mvc
ms.date: 10/14/2019
ms.date: 10/15/2019
uid: tutorials/first-blazor-app
---
# Build your first Blazor app
Expand Down

0 comments on commit 9f4646a

Please sign in to comment.