Skip to content

Commit 944555c

Browse files
committed
ensure RID-specific packages get correct entrypoint and package type
1 parent 09e7d95 commit 944555c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ Copyright (c) .NET Foundation. All rights reserved.
6767
<!-- Needs to be in a target so we don't need to worry about evaluation order with NativeBinary property -->
6868
<PropertyGroup Condition="'$(ToolEntryPoint)' == ''">
6969
<ToolEntryPoint>$(TargetFileName)</ToolEntryPoint>
70-
<ToolEntryPoint Condition=" '$(UseAppHost)' == 'true' ">$(AssemblyName)$(_NativeExecutableExtension)</ToolEntryPoint>
70+
<ToolEntryPoint Condition="'$(RuntimeIdentifier)' != '' and '$(UseAppHost)' == 'true' ">$(AssemblyName)$(_NativeExecutableExtension)</ToolEntryPoint>
7171
</PropertyGroup>
7272

7373
<!-- inner-build tool packages get a RID suffix -->
74-
<PropertyGroup Condition="'$(ToolPackageRuntimeIdentifier)' != '' And '$(RuntimeIdentifier)' != ''">
74+
<PropertyGroup Condition="'$(ToolPackageRuntimeIdentifiers)' != '' And '$(RuntimeIdentifier)' != ''">
7575
<PackageId>$(PackageId).$(RuntimeIdentifier)</PackageId>
7676
</PropertyGroup>
7777

@@ -132,7 +132,7 @@ Copyright (c) .NET Foundation. All rights reserved.
132132

133133
<Target Name="_GenerateToolsSettingsFileInputCache">
134134
<ItemGroup>
135-
<_ToolPackageRuntimeIdentifier Include="$(ToolRuntimeIdentifier)" />
135+
<_ToolPackageRuntimeIdentifier Include="$(ToolRuntimeIdentifiers)" />
136136
<_GenerateToolsSettingsFileInputCacheToHash Include="$(ToolEntryPoint)" />
137137
<_GenerateToolsSettingsFileInputCacheToHash Include="$(ToolCommandName)" />
138138
<_GenerateToolsSettingsFileInputCacheToHash Include="$(ToolCommandRunner)" />

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.Common.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Copyright (c) .NET Foundation. All rights reserved.
5454
BeforeTargets="GenerateNuspec">
5555

5656
<PropertyGroup>
57-
<_ToolPackageType Condition="'$(RuntimeIdentifier)' != '' And '$(ToolPackageRuntimeIdentifier)' != ''">DotnetToolRidPackage</_ToolPackageType>
57+
<_ToolPackageType Condition="'$(RuntimeIdentifier)' != '' And '$(ToolPackageRuntimeIdentifiers)' != ''">DotnetToolRidPackage</_ToolPackageType>
5858
<_ToolPackageType Condition="'$(_ToolPackageType)' == ''">DotnetTool</_ToolPackageType>
5959
</PropertyGroup>
6060

0 commit comments

Comments
 (0)