Skip to content

Commit 09cfa52

Browse files
MSLukeWestLuke Westendorf
and
Luke Westendorf
authored
Adding back ComputeFilesCopiedToPublishDir item group to fix wapproj compat bug (#10925) (#10978)
Co-authored-by: Luke Westendorf <[email protected]> Co-authored-by: Luke Westendorf <[email protected]>
1 parent a546597 commit 09cfa52

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

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

+18-9
Original file line numberDiff line numberDiff line change
@@ -1055,6 +1055,20 @@ Copyright (c) .NET Foundation. All rights reserved.
10551055
</GetEmbeddedApphostPaths>
10561056

10571057
</Target>
1058+
1059+
<!--
1060+
============================================================
1061+
ComputeFilesCopiedToPublishDir
1062+
1063+
Gathers all the files that were copied to the publish directory. This is used by wapproj and is required for back compat.
1064+
============================================================
1065+
-->
1066+
<Target Name="ComputeFilesCopiedToPublishDir" DependsOnTargets="ComputeFilesToPublish">
1067+
<ItemGroup>
1068+
<FilesCopiedToPublishDir Include="@(ResolvedFileToPublish)"/>
1069+
<FilesCopiedToPublishDir Include="$(PublishedSingleFilePath)" RelativePath="$(PublishedSingleFileName)" IsKeyOutput="true" Condition="'$(PublishSingleFile)' == 'true'"/>
1070+
</ItemGroup>
1071+
</Target>
10581072

10591073
<!--
10601074
============================================================
@@ -1067,21 +1081,16 @@ Copyright (c) .NET Foundation. All rights reserved.
10671081
<PublishItemsOutputGroupDependsOn>
10681082
$(PublishItemsOutputGroupDependsOn);
10691083
ResolveReferences;
1070-
ComputeFilesToPublish;
1084+
ComputeFilesCopiedToPublishDir;
10711085
</PublishItemsOutputGroupDependsOn>
10721086
</PropertyGroup>
10731087

10741088
<Target Name="PublishItemsOutputGroup" DependsOnTargets="$(PublishItemsOutputGroupDependsOn)" Returns="@(PublishItemsOutputGroupOutputs)">
10751089
<ItemGroup>
1076-
<PublishItemsOutputGroupOutputs Include="@(ResolvedFileToPublish->'%(FullPath)')"
1077-
TargetPath="%(ResolvedFileToPublish.RelativePath)"
1078-
IsKeyOutput="%(ResolvedFileToPublish.IsKeyOutput)"
1090+
<PublishItemsOutputGroupOutputs Include="@(FilesCopiedToPublishDir->'%(FullPath)')"
1091+
TargetPath="%(FilesCopiedToPublishDir.RelativePath)"
1092+
IsKeyOutput="%(FilesCopiedToPublishDir.IsKeyOutput)"
10791093
OutputGroup="PublishItemsOutputGroup" />
1080-
<PublishItemsOutputGroupOutputs Include="$(PublishedSingleFilePath)"
1081-
TargetPath="$(PublishedSingleFileName)"
1082-
IsKeyOutput="true"
1083-
OutputGroup="PublishItemsOutputGroup"
1084-
Condition="'$(PublishSingleFile)' == 'true'" />
10851094
</ItemGroup>
10861095
</Target>
10871096

0 commit comments

Comments
 (0)