Skip to content

Commit

Permalink
Adding back ComputeFilesCopiedToPublishDir item group to fix wapproj …
Browse files Browse the repository at this point in the history
…compat bug (#10925) (#10978)

Co-authored-by: Luke Westendorf <lukewest@microsoft.com>

Co-authored-by: Luke Westendorf <lukewest@microsoft.com>
  • Loading branch information
MSLukeWest and Luke Westendorf committed Mar 26, 2020
1 parent a546597 commit 09cfa52
Showing 1 changed file with 18 additions and 9 deletions.
Expand Up @@ -1055,6 +1055,20 @@ Copyright (c) .NET Foundation. All rights reserved.
</GetEmbeddedApphostPaths>

</Target>

<!--
============================================================
ComputeFilesCopiedToPublishDir
Gathers all the files that were copied to the publish directory. This is used by wapproj and is required for back compat.
============================================================
-->
<Target Name="ComputeFilesCopiedToPublishDir" DependsOnTargets="ComputeFilesToPublish">
<ItemGroup>
<FilesCopiedToPublishDir Include="@(ResolvedFileToPublish)"/>
<FilesCopiedToPublishDir Include="$(PublishedSingleFilePath)" RelativePath="$(PublishedSingleFileName)" IsKeyOutput="true" Condition="'$(PublishSingleFile)' == 'true'"/>
</ItemGroup>
</Target>

<!--
============================================================
Expand All @@ -1067,21 +1081,16 @@ Copyright (c) .NET Foundation. All rights reserved.
<PublishItemsOutputGroupDependsOn>
$(PublishItemsOutputGroupDependsOn);
ResolveReferences;
ComputeFilesToPublish;
ComputeFilesCopiedToPublishDir;
</PublishItemsOutputGroupDependsOn>
</PropertyGroup>

<Target Name="PublishItemsOutputGroup" DependsOnTargets="$(PublishItemsOutputGroupDependsOn)" Returns="@(PublishItemsOutputGroupOutputs)">
<ItemGroup>
<PublishItemsOutputGroupOutputs Include="@(ResolvedFileToPublish->'%(FullPath)')"
TargetPath="%(ResolvedFileToPublish.RelativePath)"
IsKeyOutput="%(ResolvedFileToPublish.IsKeyOutput)"
<PublishItemsOutputGroupOutputs Include="@(FilesCopiedToPublishDir->'%(FullPath)')"
TargetPath="%(FilesCopiedToPublishDir.RelativePath)"
IsKeyOutput="%(FilesCopiedToPublishDir.IsKeyOutput)"
OutputGroup="PublishItemsOutputGroup" />
<PublishItemsOutputGroupOutputs Include="$(PublishedSingleFilePath)"
TargetPath="$(PublishedSingleFileName)"
IsKeyOutput="true"
OutputGroup="PublishItemsOutputGroup"
Condition="'$(PublishSingleFile)' == 'true'" />
</ItemGroup>
</Target>

Expand Down

0 comments on commit 09cfa52

Please sign in to comment.