Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

Commit 22878ee

Browse files
authored
Merge pull request #638 from massimobonanni/Update-LAB-PackageManagement
LAB13-EX01-TASK02-STEP10: Add argument to dotnet pack command to create a package with unique name
2 parents 8921e99 + 5191a2e commit 22878ee

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Instructions/Labs/AZ400_M07_L13_Package_Management_with_Azure_Artifacts.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,23 +144,23 @@ In this task, you will create and publish an in-house developed custom NuGet pac
144144
1. From your lab workstation, open the Start menu, and search for **Windows PowerShell**. Next, in the cascading menu, click **Open Windows PowerShell as administrator**.
145145
1. In the **Administrator: Windows PowerShell** window, navigate to the eShopOnWeb.Shared folder, by executing the following command:
146146

147-
```text
147+
```powershell
148148
cd c:\eShopOnWeb\eShopOnWeb.Shared
149149
```
150150

151151
> **Note**: The **eShopOnWeb.Shared** folder is the location of the **eShopOnWeb.Shared.csproj** file. If you chose a different location or project name, navigate to that location instead.
152152
153-
1. Run the following to create a **.nupkg** file from the project.
153+
1. Run the following to create a **.nupkg** file from the project (change the value of `XXXXXX` placeholder with a unique string).
154154

155155
```powershell
156-
dotnet pack .\eShopOnWeb.Shared.csproj
156+
dotnet pack .\eShopOnWeb.Shared.csproj -p:PackageId=eShopOnWeb-XXXXX.Shared
157157
```
158158

159159
> **Note**: The **dotnet pack** command builds the project and creates a NuGet package in the **bin\Release** folder. If you don't have a **Release** folder, you can use the **Debug** folder instead.
160160
161161
> **Note**: Disregard any warnings displayed in the **Administrator: Windows PowerShell** window.
162162
163-
> **Note**: dotnet pack builds a minimal package based on the information it is able to identify from the project. For example, note that the name is **eShopOnWeb.Shared.1.0.0.nupkg**. That version number was retrieved from the assembly.
163+
> **Note**: dotnet pack builds a minimal package based on the information it is able to identify from the project. The argument `-p:PackageId=eShopOnWeb-XXXXXX.Shared` allows you to create a package with a specific name instead using the name contains in the project. For example, if you substitute the string `12345` to the `XXXXXX` placeholder, the name of the package will be **eShopOnWeb-12345.Shared.1.0.0.nupkg**. The version number was retrieved from the assembly.
164164
165165
1. In the PowerShell window, run the following command to open the **bin\Release** folder:
166166

0 commit comments

Comments
 (0)