Skip to content

Commit 8835150

Browse files
Do not use live shims for tools packages in VMR (#48153)
1 parent c701973 commit 8835150

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Directory.Build.targets

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@
5454
Condition="'$(RunTestsAsTool)' == 'true' And '$(CanRunTestAsTool)' == 'true'"/>
5555

5656
<!-- Update KnownFrameworkReferences to target the right version of the runtime -->
57+
<!-- We cannot use live shims when building tool packs in VMR - only package for current arch is available. -->
5758
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'
5859
and $(MicrosoftNETCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))
59-
and '$(MSBuildProjectName)' != 'sdk-tasks'">
60+
and '$(MSBuildProjectName)' != 'sdk-tasks'
61+
and ('$(DotNetBuild)' != 'true' or '$(PackAsToolShimRuntimeIdentifiers)' == '')">
6062
<FrameworkReference
6163
Update="Microsoft.NETCore.App"
6264
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)"

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
These identifiers are for generating the shim'd core executables for signing. Not all options
2424
from $(RoslynPortableRuntimeIdentifiers) work or make sense in this context.
2525
-->
26-
<PackAsToolShimRuntimeIdentifiers Condition="'$(DotNetBuild)' != 'true'">win-x64;win-x86;osx-x64</PackAsToolShimRuntimeIdentifiers>
27-
<PackAsToolShimRuntimeIdentifiers Condition="'$(DotNetBuild)' == 'true' and $(SignableShimRuntimeIdentifier.Contains('$(TargetRid)'))">$(TargetRid)</PackAsToolShimRuntimeIdentifiers>
26+
<PackAsToolShimRuntimeIdentifiers Condition="'$(DotNetBuildSourceOnly)' != 'true'">win-x64;win-x86;osx-x64</PackAsToolShimRuntimeIdentifiers>
2827

2928
<!-- Avoid https://github.com/dotnet/arcade/issues/9305 -->
3029
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>

0 commit comments

Comments
 (0)