Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions eng/tools/GenerateFiles/Directory.Build.targets.in
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@

<ItemGroup>
<!-- Use the same NETCore shared framework as repo built against except when building product code in servicing. -->
<KnownFrameworkReference Update="Microsoft.NETCore.App">
<!-- We cannot use live shims when building tool packs in VMR - only package for current arch is available. -->
<KnownFrameworkReference Update="Microsoft.NETCore.App" Condition=" '$(DotNetBuild)' != 'true' OR '$(PackAsToolShimRuntimeIdentifiers)' == '' ">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To confirm, PackAsToolShimRuntimeIdentifiers is usually empty, right? Because we always want to update this, except for in these tool package scenarios in the VMR

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, PackAsToolShimRuntimeIdentifiers is not set (i.e. empty) unless a specific project builds as a tool and needs to pack shims.

<LatestRuntimeFrameworkVersion
Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftNETCoreAppRuntimeVersion}</LatestRuntimeFrameworkVersion>
<TargetingPackVersion
Expand All @@ -83,7 +84,8 @@
<RuntimePackRuntimeIdentifiers Condition="'$(DotNetBuild)' == 'true'">%(RuntimePackRuntimeIdentifiers);$(TargetRuntimeIdentifier)</RuntimePackRuntimeIdentifiers>
</KnownFrameworkReference>

<KnownAppHostPack Update="Microsoft.NETCore.App">
<!-- We cannot use live shims when building tool packs in VMR - only package for current arch is available. -->
<KnownAppHostPack Update="Microsoft.NETCore.App" Condition=" '$(DotNetBuild)' != 'true' OR '$(PackAsToolShimRuntimeIdentifiers)' == '' ">
<AppHostPackVersion
Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftNETCoreAppRuntimeVersion}</AppHostPackVersion>
<AppHostRuntimeIdentifiers Condition=" '$(DotNetBuildSourceOnly)' == 'true' ">$(TargetRuntimeIdentifier)</AppHostRuntimeIdentifiers>
Expand Down
4 changes: 1 addition & 3 deletions src/Tools/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<Project>
<PropertyGroup Condition=" '$(PackAsTool)' == 'true' ">
<!-- Microsoft tool packages are required to target both x64 and x86. -->
<!-- In VMR builds we only use the current RID. -->
<PackAsToolShimRuntimeIdentifiers Condition=" '$(IsShippingPackage)' == 'true' AND '$(DotNetBuild)' != 'true' ">win-x64;win-x86</PackAsToolShimRuntimeIdentifiers>
<PackAsToolShimRuntimeIdentifiers Condition=" '$(IsShippingPackage)' == 'true' AND '$(DotNetBuild)' == 'true' AND '$(TargetOsName)' == 'win' ">$(TargetRid)</PackAsToolShimRuntimeIdentifiers>
<PackAsToolShimRuntimeIdentifiers Condition=" '$(IsShippingPackage)' == 'true' AND ('$(DotNetBuild)' != 'true' OR '$(TargetOsName)' == 'win')">win-x64;win-x86</PackAsToolShimRuntimeIdentifiers>
<!-- None of the tool projects are project reference providers. -->
<IsProjectReferenceProvider>false</IsProjectReferenceProvider>
<!--
Expand Down
Loading