[release/5.0] Target 5.0.0 shared framework in global tools (#27599)
- #19108 - ensure the packaged runtimeconfig.json file uses the 5.0.0 shared framework - disable `$(TargetLatestDotNetRuntime)` in tool projects - skip `@(FrameworkReference)` item update if `$(TargetLatestDotNetRuntime)` is disabled nit: Move `$(PackAsTool)` settings together
This commit is contained in:
parent
80f8669450
commit
ca8cc104f4
|
|
@ -52,11 +52,6 @@
|
||||||
<SuppressDependenciesWhenPacking Condition="'$(SuppressDependenciesWhenPacking)' == '' AND '$(IsAnalyzersProject)' == 'true'">true</SuppressDependenciesWhenPacking>
|
<SuppressDependenciesWhenPacking Condition="'$(SuppressDependenciesWhenPacking)' == '' AND '$(IsAnalyzersProject)' == 'true'">true</SuppressDependenciesWhenPacking>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(PackAsTool)' == 'true' AND '$(IsShippingPackage)' == 'true'">
|
|
||||||
<!-- This is a requirement for Microsoft tool packages only. -->
|
|
||||||
<PackAsToolShimRuntimeIdentifiers>win-x64;win-x86</PackAsToolShimRuntimeIdentifiers>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition=" '$(MSBuildProjectExtension)' == '.csproj' ">
|
<PropertyGroup Condition=" '$(MSBuildProjectExtension)' == '.csproj' ">
|
||||||
<PackageId Condition=" '$(PackageId)' == '' ">$(AssemblyName)</PackageId>
|
<PackageId Condition=" '$(PackageId)' == '' ">$(AssemblyName)</PackageId>
|
||||||
<IsPackable
|
<IsPackable
|
||||||
|
|
@ -106,7 +101,7 @@
|
||||||
<IsImplementationProject Condition=" '$(IsImplementationProject)' == '' AND '$(IsAnalyzersProject)' != 'true' AND '$(IsTestAssetProject)' != 'true' AND '$(IsTestProject)' != 'true' AND '$(IsBenchmarkProject)' != 'true' AND '$(IsSampleProject)' != 'true' ">true</IsImplementationProject>
|
<IsImplementationProject Condition=" '$(IsImplementationProject)' == '' AND '$(IsAnalyzersProject)' != 'true' AND '$(IsTestAssetProject)' != 'true' AND '$(IsTestProject)' != 'true' AND '$(IsBenchmarkProject)' != 'true' AND '$(IsSampleProject)' != 'true' ">true</IsImplementationProject>
|
||||||
|
|
||||||
<!-- This determines whether a project is available as a <Reference> to other projects in this repo. -->
|
<!-- This determines whether a project is available as a <Reference> to other projects in this repo. -->
|
||||||
<IsProjectReferenceProvider Condition=" '$(IsProjectReferenceProvider)' == '' AND '$(IsImplementationProject)' == 'true' AND '$(PackAsTool)' != 'true' ">true</IsProjectReferenceProvider>
|
<IsProjectReferenceProvider Condition=" '$(IsProjectReferenceProvider)' == '' AND '$(IsImplementationProject)' == 'true' ">true</IsProjectReferenceProvider>
|
||||||
|
|
||||||
<HasReferenceAssembly
|
<HasReferenceAssembly
|
||||||
Condition=" '$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' AND '$(IsAspNetCoreApp)' == 'true' ">true</HasReferenceAssembly>
|
Condition=" '$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' AND '$(IsAspNetCoreApp)' == 'true' ">true</HasReferenceAssembly>
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,9 @@
|
||||||
<!-- Reference base shared framework at incoming dependency flow version, not bundled sdk version. -->
|
<!-- Reference base shared framework at incoming dependency flow version, not bundled sdk version. -->
|
||||||
<FrameworkReference
|
<FrameworkReference
|
||||||
Update="Microsoft.NETCore.App"
|
Update="Microsoft.NETCore.App"
|
||||||
Condition="'$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'"
|
Condition=" '$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' AND '$(TargetLatestDotNetRuntime)' != 'false' "
|
||||||
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimeVersion)"
|
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimeVersion)"
|
||||||
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
|
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)" />
|
||||||
/>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,20 @@
|
||||||
<Project>
|
<Project>
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.targets))\Directory.Build.targets" />
|
<PropertyGroup Condition=" '$(PackAsTool)' == 'true' ">
|
||||||
|
<!-- Microsoft tool packages are required to target both x64 and x86. -->
|
||||||
<PropertyGroup>
|
<PackAsToolShimRuntimeIdentifiers Condition=" '$(IsShippingPackage)' == 'true' ">win-x64;win-x86</PackAsToolShimRuntimeIdentifiers>
|
||||||
<UseLatestPackageReferences Condition=" '$(PackAsTool)' == 'true' ">true</UseLatestPackageReferences>
|
<!-- None of the tool projects are project reference providers. -->
|
||||||
|
<IsProjectReferenceProvider>false</IsProjectReferenceProvider>
|
||||||
|
<!--
|
||||||
|
Target the default version of .NET Core in tool projects to maximize the compatible environments. Must be set
|
||||||
|
before importing root Directory.Build.targets.
|
||||||
|
-->
|
||||||
|
<TargetLatestDotNetRuntime Condition=" '$(IsServicingBuild)' == 'true' ">false</TargetLatestDotNetRuntime>
|
||||||
|
<!-- Tool projects publish before packing. Packages should contain the latest bits. -->
|
||||||
|
<UseLatestPackageReferences>true</UseLatestPackageReferences>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.targets))\Directory.Build.targets" />
|
||||||
|
|
||||||
<Target Name="CleanPublishDir" AfterTargets="CoreClean">
|
<Target Name="CleanPublishDir" AfterTargets="CoreClean">
|
||||||
<RemoveDir Directories="$(PublishDir)" />
|
<RemoveDir Directories="$(PublishDir)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue