@@ -30,6 +30,8 @@ Copyright (c) .NET Foundation. All rights reserved.
30
30
<PublishTrimmed Condition =" '$(RuntimeIdentifier)' == ''" >false</PublishTrimmed >
31
31
<PublishReadyToRun Condition =" '$(RuntimeIdentifier)' == ''" >false</PublishReadyToRun >
32
32
<PublishAot Condition =" '$(RuntimeIdentifier)' == ''" >false</PublishAot >
33
+ <!-- If shims are included, we need to make sure we restore for those RIDs so the apphost shims are available during restore/publish -->
34
+ <RuntimeIdentifiers Condition =" '$(PackAsToolShimRuntimeIdentifiers)' != ''" >$(RuntimeIdentifiers);$(PackAsToolShimRuntimeIdentifiers)</RuntimeIdentifiers >
33
35
34
36
<!-- Tool implementation files are not included in the primary package when the tool has RID-specific packages. So only pack the tool implementation
35
37
(and only depend on publish) if there are no RID-specific packages, or if the RuntimeIdentifier is set. -->
@@ -106,7 +108,7 @@ Copyright (c) .NET Foundation. All rights reserved.
106
108
<_GeneratedFiles Include =" $(_ToolsSettingsFilePath)" />
107
109
<_PublishFilesRaw Condition =" '$(_ToolPackageShouldIncludeImplementation)' == 'true'" Include =" $(PublishDir)/**/*" />
108
110
<_PublishFiles Condition =" '$(_ToolPackageShouldIncludeImplementation)' == 'true'" Include =" @(_PublishFilesRaw)" >
109
- <RelativePath >$([System.IO.Path]::GetRelativePath($(PublishDir), %(Identity)))</RelativePath >
111
+ <RelativePath >$([System.IO.Path]::GetRelativePath($(PublishDir), $([System.IO.Path]::GetDirectoryName( %(Identity)) )))</RelativePath >
110
112
</_PublishFiles >
111
113
</ItemGroup >
112
114
@@ -116,7 +118,7 @@ Copyright (c) .NET Foundation. All rights reserved.
116
118
</PropertyGroup >
117
119
<ItemGroup >
118
120
<TfmSpecificPackageFile Include =" @(_GeneratedFiles)" >
119
- <PackagePath >tools/$(_ToolPackShortTargetFrameworkName)/$(_ToolRidPath)/%(_GeneratedFiles.RecursiveDir)%(_GeneratedFiles.Filename)%(_GeneratedFiles.Extension) </PackagePath >
121
+ <PackagePath >tools/$(_ToolPackShortTargetFrameworkName)/$(_ToolRidPath)/%(_GeneratedFiles.RecursiveDir)</PackagePath >
120
122
</TfmSpecificPackageFile >
121
123
122
124
<TfmSpecificPackageFile Include =" @(_PublishFiles)" >
@@ -232,7 +234,7 @@ Copyright (c) .NET Foundation. All rights reserved.
232
234
ApphostsForShimRuntimeIdentifiers =" @(_ApphostsForShimRuntimeIdentifiers)"
233
235
IntermediateAssembly =" @(IntermediateAssembly->'%(FullPath)')"
234
236
OutputType =" $(OutputType)"
235
- PackagedShimOutputDirectory =" $(PackagedShimOutputRootDirectory)/ shims/$(_ToolPackShortTargetFrameworkName)"
237
+ PackagedShimOutputDirectory =" $(PackagedShimOutputRootDirectory)shims/$(_ToolPackShortTargetFrameworkName)"
236
238
PackageId =" $(PackageId)"
237
239
PackageVersion =" $(PackageVersion)"
238
240
ShimRuntimeIdentifiers =" @(_PackAsToolShimRuntimeIdentifiers)"
@@ -261,7 +263,7 @@ Copyright (c) .NET Foundation. All rights reserved.
261
263
262
264
<Target Name =" _ComputeExpectedEmbeddedApphostPaths" >
263
265
<GetEmbeddedApphostPaths
264
- PackagedShimOutputDirectory =" $(PackagedShimOutputRootDirectory)/ shims/$(_ToolPackShortTargetFrameworkName)"
266
+ PackagedShimOutputDirectory =" $(PackagedShimOutputRootDirectory)shims/$(_ToolPackShortTargetFrameworkName)"
265
267
ShimRuntimeIdentifiers =" @(_PackAsToolShimRuntimeIdentifiers)"
266
268
ToolCommandName =" $(ToolCommandName)" >
267
269
0 commit comments