Skip to content

Commit 04b2231

Browse files
authored
Only pack as tool shim in VMR builds when signing is possible (#40262)
1 parent 87e32f7 commit 04b2231

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/BuiltInTools/dotnet-format/dotnet-format.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818
<!-- Copy nuget assemblies to build directory. -->
1919
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
2020

21+
<SignableShimRuntimeIdentifiers>win-x64;win-x86;osx-x64</SignableShimRuntimeIdentifiers>
22+
2123
<!--
2224
These identifiers are for generating the shim'd core executables for signing. Not all options
2325
from $(RoslynPortableRuntimeIdentifiers) work or make sense in this context.
2426
-->
25-
<PackAsToolShimRuntimeIdentifiers Condition=" '$(DotnetBuildFromSource)' != 'true' ">win-x64;win-x86;osx-x64</PackAsToolShimRuntimeIdentifiers>
27+
<PackAsToolShimRuntimeIdentifiers Condition="'$(DotNetBuild)' != 'true'">win-x64;win-x86;osx-x64</PackAsToolShimRuntimeIdentifiers>
28+
<PackAsToolShimRuntimeIdentifiers Condition="'$(DotNetBuild)' == 'true' and $(SignableShimRuntimeIdentifier.Contains('$(TargetRid)'))">$(TargetRid)</PackAsToolShimRuntimeIdentifiers>
2629
</PropertyGroup>
2730

2831
<ItemGroup>

0 commit comments

Comments
 (0)