Skip to content

Commit c2c51c7

Browse files
committed
review-3
1 parent 01e3a87 commit c2c51c7

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

learn-pr/aspnetcore/blazor-build-reusable-components/1-introduction.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
unitType: introduction
66
title: Introduction to Razor class libraries
77
description: "By using Razor class libraries, you can share user-interface components between ASP.NET Core and Blazor applications. You package the components using NuGet and other applications can easily reference them."
8-
ms.date: 01/26/2024
8+
ms.date: 04/07/2025
99
author: csharpfritz
1010
ms.author: jefritz
1111
ms.manager: markl

learn-pr/aspnetcore/blazor-build-reusable-components/2-concepts-razor-class-library.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
unitType: learning-content
66
title: Razor class library creation and concepts
77
description: "In this unit, you learn about Razor class libraries, how to create one, and how they differ from other .NET class libraries."
8-
ms.date: 01/26/2024
8+
ms.date: 04/07/2025
99
author: csharpfritz
1010
ms.author: jefritz
1111
ms.manager: markl

learn-pr/aspnetcore/blazor-build-reusable-components/3-create-razor-class-library.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
unitType: exercise
66
title: Create a Razor class library
77
description: "In this exercise, you create your first Razor class library with a component that can be used in Blazor and ASP.NET Core applications."
8-
ms.date: 01/26/2024
8+
ms.date: 04/07/2025
99
author: csharpfritz
1010
ms.author: jefritz
1111
ms.manager: markl

learn-pr/aspnetcore/blazor-build-reusable-components/4-concept-package-razor-class-library.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
unitType: learning-content
66
title: Package a Razor class library
77
description: "In this unit, you learn how Razor class libraries are packaged when they're shared with other developers."
8-
ms.date: 01/26/2024
8+
ms.date: 04/07/2025
99
author: csharpfritz
1010
ms.author: jefritz
1111
ms.manager: markl

learn-pr/aspnetcore/blazor-build-reusable-components/5-nuget-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
unitType: exercise
66
title: Create a NuGet package
77
description: "In this exercise, you package the Razor class library that you created earlier."
8-
ms.date: 01/26/2024
8+
ms.date: 04/07/2025
99
author: csharpfritz
1010
ms.author: jefritz
1111
ms.manager: markl

learn-pr/aspnetcore/blazor-build-reusable-components/6-summary.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
unitType: summary
66
title: Summary
77
description: "This unit summarizes what you learned about creating Razor class libraries."
8-
ms.date: 01/26/2024
8+
ms.date: 04/07/2025
99
author: csharpfritz
1010
ms.author: jefritz
1111
ms.manager: markl

learn-pr/aspnetcore/blazor-build-reusable-components/includes/5-nuget-package.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ In this unit, you update that project and generate a NuGet package. Finally, you
88

99
Begin by updating the *FirstClassLibrary* project with properties that allow it to be packaged for deployment as a NuGet package.
1010

11-
1. Open the project file for the *MyClassLibrary* project. Either double-click the project in Visual Studio Solution Explorer or open the *MyClassLibrary.csproj* file in Visual Studio Code.
11+
1. Open the project file for the *FirstClassLibrary* project. Either double-click the project in Visual Studio Solution Explorer or open the **FirstClassLibrary*.csproj* file in Visual Studio Code.
1212
1. Near the top of the file, in the section with the `<PropertyGroup>` tag, add the following content before the closing `</PropertyGroup>` tag:
1313

1414
```xml
@@ -28,45 +28,45 @@ Next, you run the .NET command at the command line to package the Razor class li
2828

2929
You can run these same steps in your continuous integration process to package a library and deploy it to NuGet.org, a GitHub repository, or another location for your organization to share.
3030

31-
In the same folder as the *MyClassLibrary.csproj* file, run the following command:
31+
In the same folder as the *FirstClassLibrary.csproj* file, run the following command:
3232

3333
```dotnetcli
3434
dotnet pack
3535
```
3636

37-
This command writes a file named *My.FirstClassLibrary.0.1.0.nupkg* to your *bin/Debug* folder.
37+
This command writes a file named *My.FirstClassLibrary.0.1.0.nupkg* to your *bin/Release* folder.
3838

39-
## Add a reference to the NuGet package in the MyBlazorServer application
39+
## Add a reference to the NuGet package in the MyBlazorApp application
4040

41-
You already referenced the *FirstClassLibrary* project in your MyBlazorServer application, because it was in the same folder structure as the web application.
41+
You already referenced the *FirstClassLibrary* project in your MyBlazorApp application, because it was in the same folder structure as the web application.
4242

4343
Now, you undo that project reference and add a reference to the NuGet package that you created earlier.
4444

4545
The following steps *don't* describe a typical configuration. Library projects that reside in the same folders or solution as the applications that want to reference them can reference the project directly, as you saw in the earlier exercise.
4646

47-
1. Open the *MyBlazorServer.csproj* file either by double-clicking the *MyBlazorServer* project name in Visual Studio or by opening the file in Visual Studio Code.
48-
1. In the *MyBlazorServer.csproj* file, remove the following line:
47+
1. Open the *MyBlazorApp.csproj* file either by double-clicking the *MyBlazorApp* project name in Visual Studio or by opening the file in Visual Studio Code.
48+
1. In the *MyBlazorApp.csproj* file, remove the following line:
4949

5050
`<ProjectReference Include="..\FirstClassLibrary\FirstClassLibrary.csproj" />`
5151

52-
1. In the same folder as *MyBlazorServer.csproj*, run the following command:
52+
1. In the same folder as *MyBlazorApp.csproj*, run the following command:
5353

5454
```dotnetcli
55-
dotnet add package My.FirstClassLibrary -s ..\FirstClassLibrary\bin\Debug
55+
dotnet add package My.FirstClassLibrary -s ../FirstClassLibrary/bin/Release
5656
```
5757
58-
This command grabs the NuGet package that you created earlier, installs a copy in your local NuGet package cache, and then adds a reference to that package in the *MyBlazorServer.csproj* file.
58+
This command grabs the NuGet package that you created earlier, installs a copy in your local NuGet package cache, and then adds a reference to that package in the *MyBlazorApp.csproj* file.
5959
6060
## Check your work
6161
6262
Did your new package install properly? Can you start the FirstServer application and see a modal window when the application starts?
6363
6464
Let's find out:
6565
66-
1. Start the MyBlazorServer application either in Visual Studio, by selecting F5, or in the MyBlazorServer folder, by running the following command:
66+
1. Start the MyBlazorApp application either in Visual Studio, by selecting F5, or in the MyBlazorApp folder, by running the following command:
6767
6868
`dotnet run`
6969
70-
1. In your browser, go to the home page of the MyBlazorServer application: ``` https://localhost:5000 ```.
70+
1. In your browser, go to the home page of the MyBlazorApp application: ``` https://localhost:5000 ```.
7171
7272
Is the **My first Modal dialog** dialog displayed? If so, congratulations! You successfully packaged and deployed the *FirstClassLibrary* project correctly. Applications everywhere can now use your modal window component by referencing your newly created NuGet package.

learn-pr/aspnetcore/blazor-build-reusable-components/index.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
moduleType: standard
55
title: Build reusable components with Blazor
66
description: "Learn how to use Razor class libraries to package and deploy components with Blazor."
7-
ms.date: 01/26/2024
7+
ms.date: 04/07/2025
88
author: csharpfritz
99
ms.author: jefritz
1010
manager: coxford

0 commit comments

Comments
 (0)