Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion aspnetcore/host-and-deploy/iis/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Download the latest installer using the following link:

[Current .NET Hosting Bundle installer (direct download)](https://dotnet.microsoft.com/permalink/dotnetcore-current-windows-runtime-bundle-installer)

For more details instructions on how to install the ASP.NET Core Module, or installing different versions, see [Install the .NET Hosting Bundle](xref:host-and-deploy/iis/hosting-bundle).
For more detailed instructions on how to install the ASP.NET Core Module, or installing different versions, see [Install the .NET Hosting Bundle](xref:host-and-deploy/iis/hosting-bundle).

To download previous versions of the hosting bundle, see [this GitHub issue](https://github.com/dotnet/AspNetCore.Docs/issues/28642).

Expand Down
8 changes: 4 additions & 4 deletions aspnetcore/migration/80-to-90.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Migrate from ASP.NET Core in .NET 8 to ASP.NET Core in .NET 9
author: wadepickett
description: Learn how to migrate an ASP.NET Core in .NET 8 to ASP.NET Core in .NET 9.
ms.author: wpickett
ms.date: 2/11/2024
ms.date: 05/06/2026
uid: migration/80-to-90
---
# Migrate from ASP.NET Core in .NET 8 to ASP.NET Core in .NET 9
Expand Down Expand Up @@ -78,7 +78,7 @@ Optimize the handling of static files in your web apps by replacing <xref:Micros
+ app.MapStaticAssets();
```

In MVC & Razor Pages apps you additionally need to chain a call to `.WithStaticAssets` after `MapRazorPages` or `MapControllerRoute` in `Program.cs`. For an example, see the <xref:fundamentals/static-files?view=aspnetcore-9.0&preserve-view=true>.
In MVC & Razor Pages apps, you additionally need to chain a call to `.WithStaticAssets` after `MapRazorPages` or `MapControllerRoute` in `Program.cs`. For an example, see the <xref:fundamentals/static-files?view=aspnetcore-9.0&preserve-view=true>.

ASP.NET Core automatically fingerprints and precompresses your static files at build and publish time, and then <xref:Microsoft.AspNetCore.Builder.StaticAssetsEndpointRouteBuilderExtensions.MapStaticAssets%2A> surfaces the optimized files as endpoints using endpoint routing with appropriate caching headers.

Expand All @@ -94,7 +94,7 @@ To resolve the fingerprinted file names from your app:

* In MVC & Razor Pages apps, the script and link tag helpers will automatically resolve the fingerprinted file names.

To resolve the fingerprinted file names when importing JavaScript modules, add a generated [import map](https://developer.mozilla.org/docs/Web/HTML/Element/script/type/importmap):
To resolve the fingerprinted file names when importing JavaScript modules, add a generated [import map](https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/script/type/importmap):

* In Blazor apps, add the (<xref:Microsoft.AspNetCore.Components.ImportMap>) component to the `<head>` content of the app's root component, typically in the `App` component (`App.razor`):

Expand All @@ -103,7 +103,7 @@ To resolve the fingerprinted file names when importing JavaScript modules, add a
```

* In MVC & Razor pages apps, add `<script type="importmap"></script>` to the head of the main layout file, which is updated by the Import Map Tag Helper.

For more information, see the following resources:

* <xref:aspnetcore-9#static-asset-delivery-optimization>
Expand Down
34 changes: 17 additions & 17 deletions aspnetcore/tutorials/getting-started-with-NSwag.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Learn how to use NSwag to generate documentation and help pages for
ms.author: wpickett
ms.custom: mvc
monikerRange: ">= aspnetcore-3.1 <= aspnetcore-8.0"
ms.date: 02/07/2025
ms.date: 05/11/2026
uid: tutorials/get-started-with-nswag
---
# Get started with NSwag and ASP.NET Core
Expand All @@ -21,7 +21,7 @@ NSwag offers the following capabilities:
* The ability to utilize the Swagger UI and Swagger generator.
* Flexible code generation capabilities.

With NSwag, you don't need an existing API&mdash;you can use third-party APIs that incorporate Swagger and generate a client implementation. NSwag allows you to expedite the development cycle and easily adapt to API changes.
With NSwag, you don't need an existing API&mdash;you can use partner APIs that incorporate Swagger and generate a client implementation. NSwag allows you to expedite the development cycle and easily adapt to API changes.

## Package installation

Expand Down Expand Up @@ -50,14 +50,14 @@ Use one of the following approaches to install the NSwag NuGet package:
* Right-click the project in **Solution Explorer** > **Manage NuGet Packages**
* Set the **Package source** to "nuget.org"
* Enter "NSwag.AspNetCore" in the search box
* Select the "NSwag.AspNetCore" package from the **Browse** tab and click **Install**
* Select the "NSwag.AspNetCore" package from the **Browse** tab and select **Install**

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

* Right-click the *Packages* folder in **Solution Pad** > **Add Packages...**
* Set the **Add Packages** window's **Source** drop-down to "nuget.org"
* Enter "NSwag.AspNetCore" in the search box
* Select the "NSwag.AspNetCore" package from the results pane and click **Add Package**
* Select the "NSwag.AspNetCore" package from the results pane and select **Add Package**

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

Expand Down Expand Up @@ -105,14 +105,14 @@ You can take advantage of NSwag's code generation capabilities by choosing one o

### Generate code with NSwagStudio

* Install NSwagStudio by following the instructions at the [NSwagStudio GitHub repository](https://github.com/RicoSuter/NSwag/wiki/NSwagStudio). On the NSwag release page, you can download an xcopy version which can be started without installation and admin privileges.
* Install NSwagStudio by following the instructions at the [NSwagStudio GitHub repository](https://github.com/RicoSuter/NSwag/wiki/NSwagStudio). On the NSwag release page, you can download an xcopy version, which can be started without installation and admin privileges.
* Launch NSwagStudio and enter the `swagger.json` file URL in the **Swagger Specification URL** text box. For example, `http://localhost:5232/swagger/v1/swagger.json`.
* Click the **Create local Copy** button to generate a JSON representation of your Swagger specification.
* Select the **Create local Copy** button to generate a JSON representation of your Swagger specification.

:::image source="web-api-help-pages-using-swagger/_static/v6-nswag-NSwagStudio.png" alt-text="NSwag Studio imports the specification and exports a CSharp Client.":::

* In the **Outputs** area, click the **CSharp Client** checkbox. Depending on your project, you can also choose **TypeScript Client** or **CSharp Web API Controller**. If you select **CSharp Web API Controller**, a service specification rebuilds the service, serving as a reverse generation.
* Click **Generate Outputs** to produce a complete C# client implementation of the *TodoApi.NSwag* project. To see the generated client code, click the **CSharp Client** tab:
* In the **Outputs** area, select the **CSharp Client** checkbox. Depending on your project, you can also choose **TypeScript Client** or **CSharp Web API Controller**. If you select **CSharp Web API Controller**, a service specification rebuilds the service, serving as a reverse generation.
* Select **Generate Outputs** to produce a complete C# client implementation of the *TodoApi.NSwag* project. To see the generated client code, select the **CSharp Client** tab:

:::code language="csharp" source="web-api-help-pages-using-swagger/_static/v6-nswag-generated-todoclient.cs" range="19-55":::

Expand Down Expand Up @@ -152,7 +152,7 @@ To enable XML comments, perform the following steps:

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

* From the *Solution Pad*, press **control** and click the project name. Navigate to **Tools** > **Edit File**.
* From the *Solution Pad*, press **control** and select the project name. Navigate to **Tools** > **Edit File**.
* Manually add the highlighted lines to the `.csproj` file:

:::code language="xml" source="web-api-help-pages-using-swagger/samples/7.x/NSwagSample/NSwagSample.csproj" id="snippet_GenerateDocumentationFile" highlight="2":::
Expand All @@ -171,7 +171,7 @@ Manually add the highlighted lines to the `.csproj` file:

---

Enabling XML comments provides debug information for undocumented public types and members. Undocumented types and members are indicated by the warning message. For example, the following message indicates a violation of warning code 1591:
Enabling XML comments provides debug information for undocumented public types and members. The warning message indicates documented types and members. For example, the following message indicates a violation of warning code 1591:

```text
warning CS1591: Missing XML comment for publicly visible type or member 'TodoContext'
Expand All @@ -181,7 +181,7 @@ To suppress warnings project-wide, define a semicolon-delimited list of warning

:::code language="xml" source="web-api-help-pages-using-swagger/samples/7.x/NSwagSample/NSwagSample.csproj" id="snippet_GenerateDocumentationFileWithNoWarn" highlight="3":::

To suppress warnings only for specific members, enclose the code in [#pragma warning](/dotnet/csharp/language-reference/preprocessor-directives/preprocessor-pragma-warning) preprocessor directives. This approach is useful for code that shouldn't be exposed via the API docs. In the following example, warning code CS1591 is ignored for the entire `TodoContext` class. Enforcement of the warning code is restored at the close of the class definition. Specify multiple warning codes with a comma-delimited list.
To suppress warnings only for specific members, enclose the code in [#pragma warning](/dotnet/csharp/language-reference/preprocessor-directives#pragma-warning) preprocessor directives. This approach is useful for code that shouldn't be exposed via the API docs. In the following example, warning code CS1591 is ignored for the entire `TodoContext` class. Enforcement of the warning code is restored at the close of the class definition. Specify multiple warning codes with a comma-delimited list.

:::code language="csharp" source="web-api-help-pages-using-swagger/samples/7.x/NSwagSample/Models/TodoContext.cs" id="snippet_PragmaWarningDisable" highlight="3,10":::

Expand Down Expand Up @@ -256,8 +256,8 @@ Use one of the following approaches to install the NSwag NuGet package:
### [Visual Studio](#tab/visual-studio)

* From the **Package Manager Console** window:
* Go to **View** > **Other Windows** > **Package Manager Console**
* Navigate to the directory in which the `TodoApi.csproj` file exists
* Go to **View** > **Other Windows** > **Package Manager Console**.
* Navigate to the directory in which the `TodoApi.csproj` file exists.
* Execute the following command:

```powershell
Expand All @@ -272,10 +272,10 @@ Use one of the following approaches to install the NSwag NuGet package:

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

* Right-click the *Packages* folder in **Solution Pad** > **Add Packages...**
* Set the **Add Packages** window's **Source** drop-down to "nuget.org"
* Enter "NSwag.AspNetCore" in the search box
* Select the "NSwag.AspNetCore" package from the results pane and click **Add Package**
* Right-click the *Packages* folder in **Solution Pad** > **Add Packages...**.
* Set the **Add Packages** window's **Source** drop-down to "nuget.org".
* Enter "NSwag.AspNetCore" in the search box.
* Select the "NSwag.AspNetCore" package from the results pane and click **Add Package**.

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

Expand Down
9 changes: 5 additions & 4 deletions aspnetcore/tutorials/razor-pages/new-field.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Part 7, add a new field
author: wadepickett
description: Part 7 of tutorial series on Razor Pages.
ms.author: wpickett
ms.date: 06/23/2024
ms.date: 05/11/2026
uid: tutorials/razor-pages/new-field
---
# Part 7, add a new field to a Razor Page in ASP.NET Core
Expand Down Expand Up @@ -75,11 +75,12 @@ From the *View* menu, select *Terminal* and enter the following command:
```dotnetcli
dotnet build
```

---

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

### Add a migration for the rating field
## Add a migration for the rating field

1. From the **Tools** menu, select **NuGet Package Manager > Package Manager Console**.
1. In the Package Manager Console (PMC), enter the following command:
Expand Down Expand Up @@ -119,7 +120,7 @@ Another option is to delete the database and use migrations to re-create the dat

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

### Add a migration for rating
## Add a migration for rating

Use the following commands to add a migration for the rating field:

Expand All @@ -137,7 +138,7 @@ The name `rating` is arbitrary and is used to name the migration file. Use a mea

The `dotnet ef database update` command applies the schema changes to the database and preserves existing data.

If you delete all the records in the database, the initializer seeds the database and includes the `Rating` field.
If you delete all the records in the database, the initializer seeds the database and includes the `Rating` field.

### Optional: Drop and re-create the database for other providers

Expand Down
4 changes: 2 additions & 2 deletions aspnetcore/tutorials/web-api-javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Learn how to call an ASP.NET Core web API with JavaScript.
ms.author: wpickett
monikerRange: '>= aspnetcore-3.1'
ms.custom: mvc, devx-track-js
ms.date: 04/24/2024
ms.date: 05/12/2026
uid: tutorials/web-api-javascript
---
# Tutorial: Call an ASP.NET Core web API with JavaScript
Expand Down Expand Up @@ -50,7 +50,7 @@ The simplest `fetch` call accepts a single parameter representing the route. A s

[!code-javascript[](~/tutorials/first-web-api/samples/6.0/TodoApi/wwwroot/js/site.js?name=snippet_SiteJs)]

A change to the ASP.NET Core project's launch settings may be required to test the HTML page locally:
A change to the ASP.NET Core project's launch settings might be required to test the HTML page locally:

1. Open *Properties\launchSettings.json*.
1. Remove the `launchUrl` property to force the app to open at `index.html`&mdash;the project's default file.
Expand Down
Loading