Skip to content

Commit bc6d00d

Browse files
committed
Load the GetNuGetShortFolderName Task in PackTool.props, so that the rest of the product has it ambiently available.
Fixes a reported issue in ios/android/maui builds: https://github.com/search?q=path%3A*.props+OR+path%3A*.targets+AND+%28NOT+path%3A*%2FMicrosoft.NET.PackTool.targets%29+AND+%28NOT+path%3A*%2FMicrosoft.NET.Publish.targets%29+GetNuGetShortFolderName&type=code
1 parent 39ee3c4 commit bc6d00d

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.PackProjectTool.props

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ Copyright (c) .NET Foundation. All rights reserved.
1010
***********************************************************************************************
1111
-->
1212
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
13+
<!-- This UsingTask is in the PackTool.props because there is usage of it in other areas of the product
14+
and on public GitHub: https://github.com/search?q=path%3A*.props+OR+path%3A*.targets+AND+%28NOT+path%3A*%2FMicrosoft.NET.PackTool.targets%29+AND+%28NOT+path%3A*%2FMicrosoft.NET.Publish.targets%29+GetNuGetShortFolderName&amp;type=code -->
15+
<UsingTask TaskName="Microsoft.NET.Build.Tasks.GetNuGetShortFolderName"
16+
AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
1317

1418
<PropertyGroup>
1519
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);_PackProjectToolValidation</TargetsForTfmSpecificContentInPackage>

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ NOTE: This file is imported from the following contexts, so be aware when writin
3333
<UsingTask TaskName="Microsoft.NET.Build.Tasks.GenerateShims"
3434
AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
3535
<UsingTask TaskName="Microsoft.NET.Build.Tasks.GetEmbeddedApphostPaths"
36-
AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
37-
<UsingTask TaskName="Microsoft.NET.Build.Tasks.GetNuGetShortFolderName"
38-
AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
36+
AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
37+
<UsingTask TaskName="AddPackageType"
38+
AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
3939

4040
<PropertyGroup>
4141
<!-- tools are specially-formatted packages, so we tell nuget Pack to not even try to include build output -->
@@ -351,8 +351,6 @@ NOTE: This file is imported from the following contexts, so be aware when writin
351351
</ItemGroup>
352352
</Target>
353353

354-
<UsingTask TaskName="AddPackageType" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
355-
356354
<Target Name="SetDotnetToolPackageType">
357355

358356
<PropertyGroup>

0 commit comments

Comments
 (0)