Skip to content

Commit 333388c

Browse files
authored
Add Returns clauses to two key tool-packaging Targets to enable advanced users to build new kids of tool-based packages (#49692)
1 parent 3800f9f commit 333388c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ NOTE: This file is imported from the following contexts, so be aware when writin
157157
<Target Name="PackToPublishDependencyIndirection"
158158
DependsOnTargets="$(_PackToolPublishDependency)"/>
159159

160-
<Target Name="PackTool" DependsOnTargets="SetPackToolProperties;GenerateToolsSettingsFileFromBuildProperty;PackToPublishDependencyIndirection;_PackToolValidation;PackToolImplementation" Condition=" '$(PackAsTool)' == 'true' ">
160+
<Target Name="PackTool" DependsOnTargets="SetPackToolProperties;GenerateToolsSettingsFileFromBuildProperty;PackToPublishDependencyIndirection;_PackToolValidation;PackToolImplementation"
161+
Condition=" '$(PackAsTool)' == 'true' "
162+
Returns="@(TfmSpecificPackageFile)">
161163
<ItemGroup>
162164
<_GeneratedFiles Include="$(_ToolsSettingsFilePath)"/>
163165
<!-- Note here that we're _not_ computing relative directories inside the package anymore. In our packages, we essentially want to
@@ -358,7 +360,7 @@ NOTE: This file is imported from the following contexts, so be aware when writin
358360
</ItemGroup>
359361
</Target>
360362

361-
<Target Name="SetDotnetToolPackageType">
363+
<Target Name="SetDotnetToolPackageType" Returns="$(_ToolPackageType)">
362364

363365
<PropertyGroup>
364366
<_ToolPackageType Condition="'$(RuntimeIdentifier)' != '' And '$(_HasRIDSpecificTools)' != ''">DotnetToolRidPackage</_ToolPackageType>

0 commit comments

Comments
 (0)