@@ -34,9 +34,10 @@ Copyright (c) .NET Foundation. All rights reserved.
34
34
<PublishAot Condition =" '$(RuntimeIdentifier)' == ''" >false</PublishAot >
35
35
36
36
<!-- set up generation dependencies -->
37
- <GenerateNuspecDependsOn Condition =" ('$(GeneratePackageOnBuild)' != 'true' and '$(NoBuild)' != 'true') and $(IsPublishable) == 'true' " >$(GenerateNuspecDependsOn);_PublishBuildAlternative</GenerateNuspecDependsOn >
38
- <GenerateNuspecDependsOn Condition =" ('$(GeneratePackageOnBuild)' == 'true' or '$(NoBuild)' == 'true') and $(IsPublishable) == 'true' " >$(GenerateNuspecDependsOn);$(_PublishNoBuildAlternativeDependsOn)</GenerateNuspecDependsOn >
39
- <GenerateNuspecDependsOn Condition =" '$(ToolPackageRuntimeIdentifiers)' != '' and '$(RuntimeIdentifier)' == '' " >$(GenerateNuspecDependsOn);_CreateRIDSpecificToolPackages</GenerateNuspecDependsOn >
37
+ <!-- inner builds need publish content-->
38
+ <_PackToolPublishDependency Condition =" '$(RuntimeIdentifier)' != '' and '$(GeneratePackageOnBuild)' != 'true' and $(IsPublishable) == 'true' " >Publish</_PackToolPublishDependency >
39
+ <!-- outer build needs to generate RID-specific tool packages, but only if we're not AOT-ing (because we can't do xplat AOT). -->
40
+ <GenerateNuspecDependsOn Condition =" '$(ToolPackageRuntimeIdentifiers)' != '' and '$(RuntimeIdentifier)' == '' and '$(PublishAot)' != 'true' " >$(GenerateNuspecDependsOn);_CreateRIDSpecificToolPackages</GenerateNuspecDependsOn >
40
41
</PropertyGroup >
41
42
<!--
42
43
@@ -94,16 +95,12 @@ Copyright (c) .NET Foundation. All rights reserved.
94
95
<Target Name =" PackTool" DependsOnTargets =" SetPackToolProperties;GenerateToolsSettingsFileFromBuildProperty;PackToPublishDependencyIndirection;_PackToolValidation;PackToolImplementation" Condition =" '$(PackAsTool)' == 'true' " >
95
96
<ItemGroup >
96
97
<_GeneratedFiles Include =" $(_ToolsSettingsFilePath)" />
98
+ <_PublishFilesRaw Condition =" '$(RuntimeIdentifier)' != ''" Include =" $(PublishDir)/**/*" />
99
+ <_PublishFiles Condition =" '$(RuntimeIdentifier)' != ''" Include =" @(_PublishFilesRaw)" >
100
+ <RelativePath >$([System.IO.Path]::GetRelativePath($(PublishDir), %(Identity)))</RelativePath >
101
+ </_PublishFiles >
97
102
</ItemGroup >
98
103
99
- <ResolveToolPackagePaths
100
- AppHostIntermediatePath =" $(AppHostIntermediatePath)"
101
- ResolvedFileToPublish =" @(ResolvedFileToPublish)"
102
- PublishDir =" $(PublishDir)"
103
- ToolPackShortTargetFrameworkName =" $(_ToolPackShortTargetFrameworkName)" >
104
- <Output TaskParameter =" ResolvedFileToPublishWithPackagePath" ItemName =" _ResolvedFileToPublishWithPackagePath" />
105
- </ResolveToolPackagePaths >
106
-
107
104
<PropertyGroup >
108
105
<_ToolRidPath Condition =" '$(RuntimeIdentifier)' == ''" >any</_ToolRidPath >
109
106
<_ToolRidPath Condition =" '$(RuntimeIdentifier)' != ''" >$(RuntimeIdentifier)</_ToolRidPath >
@@ -113,8 +110,8 @@ Copyright (c) .NET Foundation. All rights reserved.
113
110
<PackagePath >tools/$(_ToolPackShortTargetFrameworkName)/$(_ToolRidPath)/%(_GeneratedFiles.RecursiveDir)%(_GeneratedFiles.Filename)%(_GeneratedFiles.Extension)</PackagePath >
114
111
</TfmSpecificPackageFile >
115
112
116
- <TfmSpecificPackageFile Include =" @(_ResolvedFileToPublishWithPackagePath )" >
117
- <PackagePath >%(_ResolvedFileToPublishWithPackagePath.PackagePath )</PackagePath >
113
+ <TfmSpecificPackageFile Include =" @(_PublishFiles )" >
114
+ <PackagePath >tools/$(_ToolPackShortTargetFrameworkName)/$(_ToolRidPath)/%(_PublishFiles.RelativePath )</PackagePath >
118
115
</TfmSpecificPackageFile >
119
116
</ItemGroup >
120
117
</Target >
0 commit comments