You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added dotnet add package CPM support documentation (#30496)
* update with added CPM support documentation
* Apply suggestions from code review
Co-authored-by: Tom Dykstra <[email protected]>
---------
Co-authored-by: Bill Wagner <[email protected]>
Co-authored-by: Tom Dykstra <[email protected]>
If the project is onboarded onto [Central Package Management (CPM)](https://devblogs.microsoft.com/nuget/introducing-central-package-management/) the `<PackageVersion>` element in the `Directory.Packages.props file` is added/updated and the `<PackageReference>` element is added to the project file.
55
+
56
+
The following scenarios are currently supported. These examples assume that the latest version of `Microsoft.EntityFrameworkCore` is 6.0.4. Additional scenarios related to CPM are documented in [this design spec](https://github.com/NuGet/Home/pull/11915).
57
+
58
+
Scenario 1: `<PackageReference>` does not exist in the project file, `<PackageVersion>` element does not exist in the `Directory.Packages.props file`, and the version argument is not passed from the commandline.
59
+
60
+
CLI command that is executed: `dotnet add ToDo.csproj package Microsoft.EntityFrameworkCore`
61
+
62
+
The `<PackageVersion>` element is added to the `Directory.Packages.props file`.
Scenario 2: `<PackageReference>` does not exist in the project file, `<PackageVersion>` element does not exist in the `Directory.Packages.props file`, and the version argument is passed from the commandline.
75
+
76
+
CLI command that is executed: `dotnet add ToDo.csproj package Microsoft.EntityFrameworkCore --version 5.0.4`
77
+
78
+
The `<PackageVersion>` element is added to the `Directory.Packages.props file`.
Scenario 3: `<PackageReference>` does not exist in the project file, `<PackageVersion>` element does exist in the `Directory.Packages.props file`, and the version argument is not passed from the commandline.
91
+
92
+
CLI command that is executed: `dotnet add ToDo.csproj package Microsoft.EntityFrameworkCore`
93
+
94
+
The `<PackageVersion>` element is added to the `Directory.Packages.props file`.
Scenario 4: `<PackageReference>` does not exist in the project file, `<PackageVersion>` element does exist in the `Directory.Packages.props file`, and the version argument is passed from the commandline.
107
+
108
+
CLI command that is executed: `dotnet add ToDo.csproj package Microsoft.EntityFrameworkCore --version 5.0.4`
109
+
110
+
The `<PackageVersion>` element is added to the `Directory.Packages.props file`.
0 commit comments