Skip to content

Commit 976f05c

Browse files
Update condition and add a comment
1 parent 45b78fe commit 976f05c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

eng/tools/GenerateFiles/Directory.Build.targets.in

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@
6464

6565
<ItemGroup>
6666
<!-- Use the same NETCore shared framework as repo built against except when building product code in servicing. -->
67-
<KnownFrameworkReference Update="Microsoft.NETCore.App" Condition=" '$(PackAsToolShimRuntimeIdentifiers)' == '' ">
67+
<!-- We cannot use live shims when building tool packs in VMR - only package for current arch is available. -->
68+
<KnownFrameworkReference Update="Microsoft.NETCore.App" Condition=" '$(DotNetBuild)' != 'true' OR '$(PackAsToolShimRuntimeIdentifiers)' == '' ">
6869
<LatestRuntimeFrameworkVersion
6970
Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftNETCoreAppRuntimeVersion}</LatestRuntimeFrameworkVersion>
7071
<TargetingPackVersion
@@ -83,7 +84,8 @@
8384
<RuntimePackRuntimeIdentifiers Condition="'$(DotNetBuild)' == 'true'">%(RuntimePackRuntimeIdentifiers);$(TargetRuntimeIdentifier)</RuntimePackRuntimeIdentifiers>
8485
</KnownFrameworkReference>
8586

86-
<KnownAppHostPack Update="Microsoft.NETCore.App" Condition=" '$(PackAsToolShimRuntimeIdentifiers)' == '' ">
87+
<!-- We cannot use live shims when building tool packs in VMR - only package for current arch is available. -->
88+
<KnownAppHostPack Update="Microsoft.NETCore.App" Condition=" '$(DotNetBuild)' != 'true' OR '$(PackAsToolShimRuntimeIdentifiers)' == '' ">
8789
<AppHostPackVersion
8890
Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftNETCoreAppRuntimeVersion}</AppHostPackVersion>
8991
<AppHostRuntimeIdentifiers Condition=" '$(DotNetBuildSourceOnly)' == 'true' ">$(TargetRuntimeIdentifier)</AppHostRuntimeIdentifiers>

0 commit comments

Comments
 (0)