@@ -31,15 +31,21 @@ Copyright (c) .NET Foundation. All rights reserved.
31
31
<PublishReadyToRun Condition =" '$(RuntimeIdentifier)' == ''" >false</PublishReadyToRun >
32
32
<PublishAot Condition =" '$(RuntimeIdentifier)' == ''" >false</PublishAot >
33
33
34
- <!-- set up generation dependencies -->
35
34
<!-- Tool implementation files are not included in the primary package when the tool has RID-specific packages. So only pack the tool implementation
36
35
(and only depend on publish) if there are no RID-specific packages, or if the RuntimeIdentifier is set. -->
37
36
<_ToolPackageShouldIncludeImplementation Condition =" '$(PackAsTool)' == 'true' And
38
37
('$(ToolPackageRuntimeIdentifiers)' == '' Or '$(RuntimeIdentifier)' != '')" >true</_ToolPackageShouldIncludeImplementation >
39
38
<_ToolPackageShouldIncludeImplementation Condition =" '$(_ToolPackageShouldIncludeImplementation)' == ''" >false</_ToolPackageShouldIncludeImplementation >
40
- <!-- inner builds need publish content-->
39
+ <_HasRIDSpecificTools Condition =" '$(ToolPackageRuntimeIdentifiers)' != '' or '$(RuntimeIdentifiers)' != '' " >true</_HasRIDSpecificTools >
40
+ <_HasRIDSpecificTools Condition =" '$(_HasRIDSpecificTools)' == ''" >false</_HasRIDSpecificTools >
41
+
42
+ <!-- inner builds and non-RID-specific outer builds need publish content-->
41
43
<_PackToolPublishDependency Condition =" '$(_ToolPackageShouldIncludeImplementation)' != '' and '$(GeneratePackageOnBuild)' != 'true' and $(IsPublishable) == 'true' " >Publish</_PackToolPublishDependency >
42
- <GenerateNuspecDependsOn Condition =" '$(ToolPackageRuntimeIdentifiers)' != '' and '$(RuntimeIdentifier)' == '' and '$(PublishAot)' != 'true' " >$(GenerateNuspecDependsOn);_CreateRIDSpecificToolPackages</GenerateNuspecDependsOn >
44
+
45
+ <!-- Trigger RID-specific inner builds if RID-specific mode is enabled-->
46
+ <GenerateNuspecDependsOn Condition =" '$(_HasRIDSpecificTools)' == 'true' and '$(PublishAot)' != 'true' " >$(GenerateNuspecDependsOn);_CreateRIDSpecificToolPackages</GenerateNuspecDependsOn >
47
+
48
+ <!-- finally set up the entrypoint for all tool-content regardless of tool type-->
43
49
<TargetsForTfmSpecificContentInPackage >$(TargetsForTfmSpecificContentInPackage);PackTool</TargetsForTfmSpecificContentInPackage >
44
50
</PropertyGroup >
45
51
<!--
0 commit comments