@@ -54,8 +54,8 @@ NOTE: This file is imported from the following contexts, so be aware when writin
5454    <_ToolRidsAreOnlyShims  Condition =" '$(RuntimeIdentifiers)' == '' and $(PackAsToolShimRuntimeIdentifiers) != '' " _ToolRidsAreOnlyShims >
5555    <_UserSpecifiedToolPackageRids  Condition =" '$(ToolPackageRuntimeIdentifiers)' != ''" _UserSpecifiedToolPackageRids >
5656    <_UserSpecifiedToolPackageRids  Condition =" '$(_UserSpecifiedToolPackageRids)' == ''" _UserSpecifiedToolPackageRids >
57-     <_HasRIDSpecificTools  Condition ="  ' $(_UserSpecifiedToolPackageRids)' != '' " _HasRIDSpecificTools >
58-     <_HasRIDSpecificTools  Condition =" '$(_HasRIDSpecificTools )' == ''" _HasRIDSpecificTools >
57+     <CreateRidSpecificToolPackages  Condition =" '$(CreateRidSpecificToolPackages)' == '' And ' $(_UserSpecifiedToolPackageRids)' != '' " CreateRidSpecificToolPackages >
58+     <CreateRidSpecificToolPackages  Condition =" '$(CreateRidSpecificToolPackages )' == ''" CreateRidSpecificToolPackages >
5959
6060    <!--  NOTE: this line is load-bearing. This impacts Restore behaviors significantly, so we can't prevent the import of these targets _in general_. --> 
6161    <RuntimeIdentifiers  Condition =" '$(PackAsToolShimRuntimeIdentifiers)' != ''" RuntimeIdentifiers >
@@ -65,7 +65,7 @@ NOTE: This file is imported from the following contexts, so be aware when writin
6565    <!--  We need to know if the inner builds are _intended_ to be AOT even if we then explicitly disable AOT for the outer builds.
6666      Knowing this lets us correctly decide to create the RID-specific inner tools or not when packaging the outer tool. -->  
6767    <_InnerToolsPublishAot >false</_InnerToolsPublishAot >
68-     <_InnerToolsPublishAot  Condition =" $(_HasRIDSpecificTools ) and '$(PublishAot)' == 'true'" _InnerToolsPublishAot >
68+     <_InnerToolsPublishAot  Condition =" $(CreateRidSpecificToolPackages ) and '$(PublishAot)' == 'true'" _InnerToolsPublishAot >
6969
7070    <!--  determining if it's safe to change publish-related properties for this evaluation. We can only override default publishing
7171         behavior if 
@@ -164,7 +164,7 @@ NOTE: This file is imported from the following contexts, so be aware when writin
164164    </PropertyGroup >
165165
166166    <!--  inner-build tool packages get a RID suffix --> 
167-     <PropertyGroup  Condition =" '$(_HasRIDSpecificTools)' != ''  And '$(RuntimeIdentifier)' != ''" 
167+     <PropertyGroup  Condition =" $(CreateRidSpecificToolPackages)  And '$(RuntimeIdentifier)' != ''" 
168168      <PackageId >$(PackageId).$(RuntimeIdentifier)</PackageId >
169169    </PropertyGroup >
170170  </Target >
@@ -390,7 +390,7 @@ NOTE: This file is imported from the following contexts, so be aware when writin
390390  <Target  Name =" SetDotnetToolPackageType" Returns =" $(_ToolPackageType)" 
391391
392392    <PropertyGroup >
393-       <_ToolPackageType  Condition =" '$(RuntimeIdentifier)' != '' And '$(_HasRIDSpecificTools)' != '' " _ToolPackageType >
393+       <_ToolPackageType  Condition =" '$(RuntimeIdentifier)' != '' And $(CreateRidSpecificToolPackages) " _ToolPackageType >
394394      <_ToolPackageType  Condition =" '$(_ToolPackageType)' == ''" _ToolPackageType >
395395    </PropertyGroup >
396396
@@ -427,7 +427,7 @@ NOTE: This file is imported from the following contexts, so be aware when writin
427427       We can't call this for AOT'd tools because we can't AOT cross-architecture and cross-platform in .NET today. -->  
428428  <Target  Name =" _CreateRIDSpecificToolPackages" 
429429    Condition =" '$(RuntimeIdentifier)' == ''
430-       and $(_HasRIDSpecificTools ) 
430+       and $(CreateRidSpecificToolPackages ) 
431431      and !$(_InnerToolsPublishAot)"  >
432432    <PropertyGroup >
433433        <_PackageRids >$(ToolPackageRuntimeIdentifiers)</_PackageRids >
0 commit comments