Skip to content

Commit 29263a2

Browse files
authored
Move "package" to NuGet link text (#37008)
1 parent 835ae8b commit 29263a2

17 files changed

+44
-44
lines changed

aspnetcore/blazor/call-web-api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ You can address this by flowing prerendered state using the Persistent Component
532532

533533
## JSON helpers
534534

535-
The [`System.Net.Http.Json`](https://www.nuget.org/packages/System.Net.Http.Json) package provides extension methods for <xref:System.Net.Http.HttpClient?displayProperty=fullName> and <xref:System.Net.Http.HttpContent?displayProperty=fullName> that perform automatic serialization and deserialization using [`System.Text.Json`](https://www.nuget.org/packages/System.Text.Json). The `System.Net.Http.Json` package is provided by the .NET shared framework and doesn't require adding a package reference to the app.
535+
The [`System.Net.Http.Json` package](https://www.nuget.org/packages/System.Net.Http.Json) provides extension methods for <xref:System.Net.Http.HttpClient?displayProperty=fullName> and <xref:System.Net.Http.HttpContent?displayProperty=fullName> that perform automatic serialization and deserialization using [`System.Text.Json`](https://www.nuget.org/packages/System.Text.Json). The `System.Net.Http.Json` package is provided by the .NET shared framework and doesn't require adding a package reference to the app.
536536

537537
<xref:System.Net.Http.HttpClient> is available as a preconfigured service for making requests back to the origin server. <xref:System.Net.Http.HttpClient> and JSON helpers (<xref:System.Net.Http.Json.HttpClientJsonExtensions?displayProperty=nameWithType>) are also used to call third-party web API endpoints. <xref:System.Net.Http.HttpClient> is implemented using the browser's [Fetch API](https://developer.mozilla.org/docs/Web/API/Fetch_API) and is subject to its limitations, including enforcement of the same-origin policy, which is discussed later in this article in the *Cross-Origin Resource Sharing (CORS)* section.
538538

@@ -750,7 +750,7 @@ using Microsoft.AspNetCore.JsonPatch.SystemTextJson;
750750
Add a package reference for the [`Microsoft.AspNetCore.Mvc.NewtonsoftJson`](https://www.nuget.org/packages/Microsoft.AspNetCore.Mvc.NewtonsoftJson) NuGet package to the web API app.
751751

752752
> [!NOTE]
753-
> There's no need to add a package reference for the [`Microsoft.AspNetCore.JsonPatch`](https://www.nuget.org/packages/Microsoft.AspNetCore.JsonPatch) package to the app because the reference to the `Microsoft.AspNetCore.Mvc.NewtonsoftJson` package automatically transitively adds a package reference for `Microsoft.AspNetCore.JsonPatch`.
753+
> There's no need to add a package reference for the [`Microsoft.AspNetCore.JsonPatch` package](https://www.nuget.org/packages/Microsoft.AspNetCore.JsonPatch) to the app because the reference to the `Microsoft.AspNetCore.Mvc.NewtonsoftJson` package automatically transitively adds a package reference for `Microsoft.AspNetCore.JsonPatch`.
754754
755755
In the `Program` file add an `@using` directive for the <xref:Microsoft.AspNetCore.JsonPatch?displayProperty=fullName> namespace:
756756

aspnetcore/blazor/components/quickgrid.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The [`QuickGrid` component](xref:Microsoft.AspNetCore.Components.QuickGrid) is a
1616

1717
## Package
1818

19-
Add a package reference for the [`Microsoft.AspNetCore.Components.QuickGrid`](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.QuickGrid) package.
19+
Add a package reference for the [`Microsoft.AspNetCore.Components.QuickGrid` package](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.QuickGrid).
2020

2121
[!INCLUDE[](~/includes/package-reference.md)]
2222

aspnetcore/blazor/forms/validation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ The following example is based on:
389389
* The `Starship` model (`Starship.cs`) of the [Example form](xref:blazor/forms/input-components#example-form) section of the *Input components* article.
390390
* The `CustomValidation` component shown in the [Validator components](#validator-components) section.
391391

392-
Place the `Starship` model (`Starship.cs`) into a shared class library project so that both the client and server projects can use the model. Add or update the namespace to match the namespace of the shared app (for example, `namespace BlazorSample.Shared`). Since the model requires data annotations, confirm that the shared class library uses the shared framework or add the [`System.ComponentModel.Annotations`](https://www.nuget.org/packages/System.ComponentModel.Annotations) package to the shared project.
392+
Place the `Starship` model (`Starship.cs`) into a shared class library project so that both the client and server projects can use the model. Add or update the namespace to match the namespace of the shared app (for example, `namespace BlazorSample.Shared`). Since the model requires data annotations, confirm that the shared class library uses the shared framework or add the [`System.ComponentModel.Annotations` package](https://www.nuget.org/packages/System.ComponentModel.Annotations) to the shared project.
393393

394394
[!INCLUDE[](~/includes/package-reference.md)]
395395

@@ -403,7 +403,7 @@ In the main project of the Blazor Web App, add a controller to process starship
403403
* The `Starship` model (`Starship.cs`) of the [Example form](xref:blazor/forms/input-components#example-form) section of the *Input components* article.
404404
* The `CustomValidation` component shown in the [Validator components](#validator-components) section.
405405

406-
Place the `Starship` model (`Starship.cs`) into the solution's **`Shared`** project so that both the client and server apps can use the model. Add or update the namespace to match the namespace of the shared app (for example, `namespace BlazorSample.Shared`). Since the model requires data annotations, add the [`System.ComponentModel.Annotations`](https://www.nuget.org/packages/System.ComponentModel.Annotations) package to the **`Shared`** project.
406+
Place the `Starship` model (`Starship.cs`) into the solution's **`Shared`** project so that both the client and server apps can use the model. Add or update the namespace to match the namespace of the shared app (for example, `namespace BlazorSample.Shared`). Since the model requires data annotations, add the [`System.ComponentModel.Annotations` package](https://www.nuget.org/packages/System.ComponentModel.Annotations) to the **`Shared`** project.
407407

408408
[!INCLUDE[](~/includes/package-reference.md)]
409409

aspnetcore/blazor/fundamentals/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ builder.Services.AddOidcAuthentication(options =>
264264

265265
*This section applies to apps that configure logging via an app settings file in the `wwwroot` folder.*
266266

267-
Add the [`Microsoft.Extensions.Logging.Configuration`](https://www.nuget.org/packages/Microsoft.Extensions.Logging.Configuration) package to the app.
267+
Add the [`Microsoft.Extensions.Logging.Configuration` package](https://www.nuget.org/packages/Microsoft.Extensions.Logging.Configuration) to the app.
268268

269269
[!INCLUDE[](~/includes/package-reference.md)]
270270

aspnetcore/blazor/fundamentals/logging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ After ***either*** of the preceding filters is added to the app, the console out
254254

255255
The example in this section demonstrates a custom logger provider for further customization.
256256

257-
Add a package reference to the app for the [`Microsoft.Extensions.Logging.Configuration`](https://www.nuget.org/packages/Microsoft.Extensions.Logging.Configuration) package.
257+
Add a package reference to the app for the [`Microsoft.Extensions.Logging.Configuration` package](https://www.nuget.org/packages/Microsoft.Extensions.Logging.Configuration).
258258

259259
[!INCLUDE[](~/includes/package-reference.md)]
260260

aspnetcore/blazor/globalization-localization.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ Optionally, add a menu item to the navigation in the `NavMenu` component (`NavMe
244244

245245
## Dynamically set the culture from the `Accept-Language` header
246246

247-
Add the [`Microsoft.Extensions.Localization`](https://www.nuget.org/packages/Microsoft.Extensions.Localization) package to the app.
247+
Add the [`Microsoft.Extensions.Localization` package](https://www.nuget.org/packages/Microsoft.Extensions.Localization) to the app.
248248

249249
The [`Accept-Language` header](https://developer.mozilla.org/docs/Web/HTTP/Headers/Accept-Language) is set by the browser and controlled by the user's language preferences in browser settings. In browser settings, a user sets one or more preferred languages in order of preference. The order of preference is used by the browser to set quality values (`q`, 0-1) for each language in the header. The following example specifies United States English, English, and Costa Rican Spanish with a preference for United States English or English:
250250

@@ -498,7 +498,7 @@ Use the `CultureExample1` component shown in the [Demonstration component](#demo
498498

499499
Examples of locations where an app might store a user's preference include in [browser local storage](https://developer.mozilla.org/docs/Web/API/Window/localStorage) (common for client-side scenarios), in a localization cookie or database (common for server-side scenarios), or in an external service attached to an external database and accessed by a [web API](xref:blazor/call-web-api). The following example demonstrates how to use browser local storage.
500500

501-
Add the [`Microsoft.Extensions.Localization`](https://www.nuget.org/packages/Microsoft.Extensions.Localization) package to the app.
501+
Add the [`Microsoft.Extensions.Localization` package](https://www.nuget.org/packages/Microsoft.Extensions.Localization) to the app.
502502

503503
[!INCLUDE[](~/includes/package-reference.md)]
504504

@@ -713,7 +713,7 @@ Examples of locations where an app might store a user's preference include in [b
713713
714714
:::moniker-end
715715
716-
Add the [`Microsoft.Extensions.Localization`](https://www.nuget.org/packages/Microsoft.Extensions.Localization) package to the app.
716+
Add the [`Microsoft.Extensions.Localization` package](https://www.nuget.org/packages/Microsoft.Extensions.Localization) to the app.
717717
718718
[!INCLUDE[](~/includes/package-reference.md)]
719719
@@ -1023,7 +1023,7 @@ Examples of locations where an app might store a user's preference include in [b
10231023

10241024
### Updates to the `.Client` project
10251025

1026-
Add the [`Microsoft.Extensions.Localization`](https://www.nuget.org/packages/Microsoft.Extensions.Localization) package to the `.Client` project.
1026+
Add the [`Microsoft.Extensions.Localization` package](https://www.nuget.org/packages/Microsoft.Extensions.Localization) to the `.Client` project.
10271027

10281028
[!INCLUDE[](~/includes/package-reference.md)]
10291029

@@ -1301,7 +1301,7 @@ Add the `CultureClient`, `CultureServer`, and `CultureExample1` components to th
13011301

13021302
### Server project updates
13031303

1304-
Add the [`Microsoft.Extensions.Localization`](https://www.nuget.org/packages/Microsoft.Extensions.Localization) package to the server project.
1304+
Add the [`Microsoft.Extensions.Localization` package](https://www.nuget.org/packages/Microsoft.Extensions.Localization) to the server project.
13051305

13061306
[!INCLUDE[](~/includes/package-reference.md)]
13071307

@@ -1431,7 +1431,7 @@ The guidance in this section also works for components in apps that adopt per-pa
14311431

14321432
## Localization
14331433

1434-
If the app doesn't already support dynamic culture selection, add the [`Microsoft.Extensions.Localization`](https://www.nuget.org/packages/Microsoft.Extensions.Localization) package to the app.
1434+
If the app doesn't already support dynamic culture selection, add the [`Microsoft.Extensions.Localization` package](https://www.nuget.org/packages/Microsoft.Extensions.Localization) to the app.
14351435

14361436
[!INCLUDE[](~/includes/package-reference.md)]
14371437

@@ -1756,7 +1756,7 @@ To further understand how the Blazor framework processes localization, see the [
17561756

17571757
To create localization shared resources, adopt the following approach.
17581758

1759-
* Confirm that the [`Microsoft.Extensions.Localization`](https://www.nuget.org/packages/Microsoft.Extensions.Localization) package is referenced by the project.
1759+
* Confirm that the [`Microsoft.Extensions.Localization` package](https://www.nuget.org/packages/Microsoft.Extensions.Localization) is referenced by the project.
17601760

17611761
[!INCLUDE[](~/includes/package-reference.md)]
17621762

aspnetcore/blazor/hybrid/security/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ Authentication in Blazor Hybrid apps is handled by native platform libraries, as
2121

2222
Integrating authentication must achieve the following goals for Razor components and services:
2323

24-
* Use the abstractions in the [`Microsoft.AspNetCore.Components.Authorization`](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.Authorization) package, such as <xref:Microsoft.AspNetCore.Components.Authorization.AuthorizeView>.
24+
* Use the abstractions in the [`Microsoft.AspNetCore.Components.Authorization` package](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.Authorization), such as <xref:Microsoft.AspNetCore.Components.Authorization.AuthorizeView>.
2525
* React to changes in the authentication context.
2626
* Access credentials provisioned by the app from the identity provider, such as access tokens to perform authorized API calls.
2727

2828
After authentication is added to a .NET MAUI, WPF, or Windows Forms app and users are able to log in and log out successfully, integrate authentication with Blazor to make the authenticated user available to Razor components and services. Perform the following steps:
2929

30-
* Reference the [`Microsoft.AspNetCore.Components.Authorization`](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.Authorization) package.
30+
* Reference the [`Microsoft.AspNetCore.Components.Authorization` package](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.Authorization).
3131

3232
[!INCLUDE[](~/includes/package-reference.md)]
3333

@@ -563,13 +563,13 @@ Authentication in Blazor Hybrid apps is handled by native platform libraries, as
563563

564564
Integrating authentication must achieve the following goals for Razor components and services:
565565

566-
* Use the abstractions in the [`Microsoft.AspNetCore.Components.Authorization`](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.Authorization) package, such as <xref:Microsoft.AspNetCore.Components.Authorization.AuthorizeView>.
566+
* Use the abstractions in the [`Microsoft.AspNetCore.Components.Authorization` package](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.Authorization), such as <xref:Microsoft.AspNetCore.Components.Authorization.AuthorizeView>.
567567
* React to changes in the authentication context.
568568
* Access credentials provisioned by the app from the identity provider, such as access tokens to perform authorized API calls.
569569

570570
After authentication is added to a .NET MAUI, WPF, or Windows Forms app and users are able to log in and log out successfully, integrate authentication with Blazor to make the authenticated user available to Razor components and services. Perform the following steps:
571571

572-
* Reference the [`Microsoft.AspNetCore.Components.Authorization`](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.Authorization) package.
572+
* Reference the [`Microsoft.AspNetCore.Components.Authorization` package](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.Authorization).
573573

574574
[!INCLUDE[](~/includes/package-reference.md)]
575575

aspnetcore/blazor/security/includes/authentication-component.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ The page produced by the `Authentication` component (`Pages/Authentication.razor
22

33
The <xref:Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticatorView> component:
44

5-
* Is provided by the [`Microsoft.AspNetCore.Components.WebAssembly.Authentication`](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.WebAssembly.Authentication/) package.
5+
* Is provided by the [`Microsoft.AspNetCore.Components.WebAssembly.Authentication` package](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.WebAssembly.Authentication/).
66
* Manages performing the appropriate actions at each stage of authentication.
77

88
```razor

aspnetcore/blazor/security/webassembly/additional-scenarios.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ For a hosted Blazor solution based on the [Blazor WebAssembly project template](
338338

339339
:::moniker-end
340340

341-
The configured <xref:System.Net.Http.HttpClient> is used to make authorized requests using the [`try-catch`](/dotnet/csharp/language-reference/keywords/try-catch) pattern. Where the client is created with <xref:System.Net.Http.IHttpClientFactory.CreateClient%2A> ([`Microsoft.Extensions.Http`](https://www.nuget.org/packages/Microsoft.Extensions.Http) package), the <xref:System.Net.Http.HttpClient> is supplied instances that include access tokens when making requests to the server API. If the request URI is a relative URI, as it is in the following example (`ExampleAPIMethod`), it's combined with the <xref:System.Net.Http.HttpClient.BaseAddress> when the client app makes the request:
341+
The configured <xref:System.Net.Http.HttpClient> is used to make authorized requests using the [`try-catch`](/dotnet/csharp/language-reference/keywords/try-catch) pattern. Where the client is created with <xref:System.Net.Http.IHttpClientFactory.CreateClient%2A> ([`Microsoft.Extensions.Http` package](https://www.nuget.org/packages/Microsoft.Extensions.Http)), the <xref:System.Net.Http.HttpClient> is supplied instances that include access tokens when making requests to the server API. If the request URI is a relative URI, as it is in the following example (`ExampleAPIMethod`), it's combined with the <xref:System.Net.Http.HttpClient.BaseAddress> when the client app makes the request:
342342
343343
```razor
344344
@inject IHttpClientFactory ClientFactory
@@ -542,7 +542,7 @@ For a hosted Blazor solution based on the [Blazor WebAssembly project template](
542542

543543
The preceding registration is in addition to the existing secure default <xref:System.Net.Http.HttpClient> registration.
544544

545-
A component creates the <xref:System.Net.Http.HttpClient> from the <xref:System.Net.Http.IHttpClientFactory> ([`Microsoft.Extensions.Http`](https://www.nuget.org/packages/Microsoft.Extensions.Http) package) to make unauthenticated or unauthorized requests:
545+
A component creates the <xref:System.Net.Http.HttpClient> from the <xref:System.Net.Http.IHttpClientFactory> ([`Microsoft.Extensions.Http` package](https://www.nuget.org/packages/Microsoft.Extensions.Http)) to make unauthenticated or unauthorized requests:
546546
547547
```razor
548548
@inject IHttpClientFactory ClientFactory

aspnetcore/blazor/security/webassembly/hosted-with-identity-server.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,9 @@ The `{ASSEMBLY NAME}` placeholder is the **:::no-loc text="Client":::** app's as
250250

251251
*This section pertains to the solution's **:::no-loc text="Client":::** app.*
252252

253-
When an app is created to use Individual Accounts (`Individual`), the app automatically receives a package reference for the [`Microsoft.AspNetCore.Components.WebAssembly.Authentication`](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.WebAssembly.Authentication) package. The package provides a set of primitives that help the app authenticate users and obtain tokens to call protected APIs.
253+
When an app is created to use Individual Accounts (`Individual`), the app automatically receives a package reference for the [`Microsoft.AspNetCore.Components.WebAssembly.Authentication` package](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.WebAssembly.Authentication). The package provides a set of primitives that help the app authenticate users and obtain tokens to call protected APIs.
254254
255-
If adding authentication to an app, manually add the [`Microsoft.AspNetCore.Components.WebAssembly.Authentication`](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.WebAssembly.Authentication) package to the app.
255+
If adding authentication to an app, manually add the [`Microsoft.AspNetCore.Components.WebAssembly.Authentication` package](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.WebAssembly.Authentication) to the app.
256256
257257
[!INCLUDE[](~/includes/package-reference.md)]
258258

@@ -280,7 +280,7 @@ The `{PROJECT NAME}` placeholder is the project name at solution creation. For e
280280

281281
*This section pertains to the solution's **:::no-loc text="Client":::** app.*
282282

283-
The support for authenticating users is plugged into the service container by the extension method provided inside the [`Microsoft.AspNetCore.Components.WebAssembly.Authentication`](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.WebAssembly.Authentication) package. This method sets up the services required by the app to interact with the existing authorization system.
283+
The support for authenticating users is plugged into the service container by the extension method provided inside the [`Microsoft.AspNetCore.Components.WebAssembly.Authentication` package](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.WebAssembly.Authentication). This method sets up the services required by the app to interact with the existing authorization system.
284284
285285
```csharp
286286
builder.Services.AddApiAuthorization();

0 commit comments

Comments
 (0)