File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,10 +34,16 @@ projects around.
3434` <PackageReference Include="X" /> ` with ** no ` Version ` ** — adding one back fails the build (NU1008). To change
3535or add a package: add a ` <PackageVersion Include="X" Version="…" /> ` centrally, then reference it bare.
3636
37- ` Nerdbank.GitVersioning ` is a ** ` GlobalPackageReference ` ** — it is injected into * every* project automatically
38- with ` PrivateAssets=All ` . Do ** not** add a ` PackageReference ` for it to a csproj or to
39- ` Directory.Build.targets ` ; that is what it looked like before CPM, and the per-project ` Update ` overrides had
40- already drifted (most projects on 3.10.91, the Android binding and samples still on 3.9.50).
37+ ` Nerdbank.GitVersioning ` is applied to every project from ` Directory.Build.targets ` :
38+
39+ ``` xml
40+ <PackageReference Include =" Nerdbank.GitVersioning" PrivateAssets =" All" />
41+ ```
42+
43+ with its version supplied centrally like everything else. ** ` PrivateAssets="All" ` is load-bearing** — it stops
44+ Nerdbank flowing into each library's ` .nuspec ` as a dependency. Don't drop it, and don't add a per-project
45+ ` PackageReference Update ` to override the version; that is what this looked like before CPM, and the overrides
46+ had already drifted (most projects on 3.10.91, the Android binding and both samples silently on 3.9.50).
4147
4248If versioning ever looks wrong — e.g. a package suddenly reporting ` 1.0.0 ` — suspect that Nerdbank stopped
4349being injected. ` Shiny.Push.FirebaseMessaging ` reading anything other than ` 5.0.1 ` is the giveaway, since
You can’t perform that action at this time.
0 commit comments