Skip to content

Commit 3ac1fe0

Browse files
authored
Allow users to override packaging implementation in generated tool packages (#50015)
2 parents a2a8598 + ece453e commit 3ac1fe0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.PackTool.targets

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ NOTE: This file is imported from the following contexts, so be aware when writin
7676

7777
<!-- Tool implementation files are not included in the primary package when the tool has RID-specific packages. So only pack the tool implementation
7878
(and only depend on publish) if there are no RID-specific packages, or if the RuntimeIdentifier is set. -->
79-
<_ToolPackageShouldIncludeImplementation Condition=" '$(PackAsTool)' == 'true' And
79+
<_ToolPackageShouldIncludeImplementation Condition=" '$(_ToolPackageShouldIncludeImplementation)' == '' And '$(PackAsTool)' == 'true' And
8080
('$(_UserSpecifiedToolPackageRids)' == ''
8181
or '$(RuntimeIdentifier)' != '')">true</_ToolPackageShouldIncludeImplementation>
8282
<_ToolPackageShouldIncludeImplementation Condition="'$(_ToolPackageShouldIncludeImplementation)' == ''">false</_ToolPackageShouldIncludeImplementation>
@@ -411,8 +411,7 @@ NOTE: This file is imported from the following contexts, so be aware when writin
411411
<Target Name="_CreateRIDSpecificToolPackages"
412412
Condition="'$(RuntimeIdentifier)' == ''
413413
and $(_HasRIDSpecificTools)
414-
and !$(_InnerToolsPublishAot)
415-
and !$(_ToolPackageShouldIncludeImplementation)">
414+
and !$(_InnerToolsPublishAot)">
416415
<PropertyGroup>
417416
<_PackageRids>$(ToolPackageRuntimeIdentifiers)</_PackageRids>
418417
<_PackageRids Condition="'$(_PackageRids)' == ''">$(RuntimeIdentifiers)</_PackageRids>

0 commit comments

Comments
 (0)