Skip to content

Commit 93d0af7

Browse files
committed
Permit settting ServiceTransitiveDependencies in projects as well
1 parent dc94a21 commit 93d0af7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/project/library-servicing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ When you make a change to a library & ship it during the servicing release, the
1818

1919
## Optionally ensure all up-stack packages are also produced
2020

21-
If you with to ensure that every package that references a serviced package is also serviced itself, you can enable validation by setting `ServiceTransitiveDependencies` to true. When doing this then building the repo, eg: `build libs -allConfigurations` you'll see errors from any project that didn't enable servicing.
21+
If you wish to ensure that every package that references a serviced package is also serviced itself, you can enable validation by setting `ServiceTransitiveDependencies` to true. This can be done in an individual project, or globally. When doing this then building the repo, eg: `build libs -allConfigurations` you'll see errors from any project that didn't enable servicing. Reasons for forcing packages which depend on your package to service are security servicing or removing dependencies.
2222

2323
## Test your changes
2424

eng/packaging.targets

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,8 @@
320320

321321
<ItemDefinitionGroup>
322322
<TargetPathWithTargetPlatformMoniker>
323-
<GeneratePackageOnBuild>$(GeneratePackageOnBuild)</GeneratePackageOnBuild>
323+
<!-- When ServiceTransitiveDependencies is set, flow the packaging state -->
324+
<GeneratePackageOnBuild Condition="'$(ServiceTransitiveDependencies)' == 'true'">$(GeneratePackageOnBuild)</GeneratePackageOnBuild>
324325
</TargetPathWithTargetPlatformMoniker>
325326
</ItemDefinitionGroup>
326327

@@ -355,8 +356,7 @@
355356
<Error Condition="'$(ServicingVersion)' == '0' and '$(GeneratePackageOnBuild)' == 'true'"
356357
Text="ServicingVersion is set to 0 and it should be an increment of the patch version from the last released package." />
357358

358-
<Error Condition="'$(ServiceTransitiveDependencies)' == 'true' and
359-
'$(GeneratePackageOnBuild)' != 'true' and
359+
<Error Condition="'$(GeneratePackageOnBuild)' != 'true' and
360360
'@(TransitiveServicedPackages)' != ''"
361361
Text="This project did not set GeneratePackageOnBuild, but dependencies '@(TransitiveServicedPackages)' did. Please ship this project by setting GeneratePackageOnBuild to true and incrementing ServicingVersion." />
362362
</Target>

0 commit comments

Comments
 (0)