Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/5.0] Target 5.0.0 shared framework in global tools #27599

Merged
merged 1 commit into from
Nov 10, 2020
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
7 changes: 1 addition & 6 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@
<SuppressDependenciesWhenPacking Condition="'$(SuppressDependenciesWhenPacking)' == '' AND '$(IsAnalyzersProject)' == 'true'">true</SuppressDependenciesWhenPacking>
</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' ">
<PackageId Condition=" '$(PackageId)' == '' ">$(AssemblyName)</PackageId>
<IsPackable
Expand Down Expand Up @@ -106,7 +101,7 @@
<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. -->
<IsProjectReferenceProvider Condition=" '$(IsProjectReferenceProvider)' == '' AND '$(IsImplementationProject)' == 'true' AND '$(PackAsTool)' != 'true' ">true</IsProjectReferenceProvider>
<IsProjectReferenceProvider Condition=" '$(IsProjectReferenceProvider)' == '' AND '$(IsImplementationProject)' == 'true' ">true</IsProjectReferenceProvider>

<HasReferenceAssembly
Condition=" '$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' AND '$(IsAspNetCoreApp)' == 'true' ">true</HasReferenceAssembly>
Expand Down
5 changes: 2 additions & 3 deletions eng/Workarounds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
<!-- Reference base shared framework at incoming dependency flow version, not bundled sdk version. -->
<FrameworkReference
Update="Microsoft.NETCore.App"
Condition="'$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'"
Condition=" '$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' AND '$(TargetLatestDotNetRuntime)' != 'false' "
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimeVersion)"
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
/>
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)" />
</ItemGroup>

<!--
Expand Down
18 changes: 14 additions & 4 deletions src/Tools/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
<Project>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.targets))\Directory.Build.targets" />

<PropertyGroup>
<UseLatestPackageReferences Condition=" '$(PackAsTool)' == 'true' ">true</UseLatestPackageReferences>
<PropertyGroup Condition=" '$(PackAsTool)' == 'true' ">
<!-- Microsoft tool packages are required to target both x64 and x86. -->
<PackAsToolShimRuntimeIdentifiers Condition=" '$(IsShippingPackage)' == 'true' ">win-x64;win-x86</PackAsToolShimRuntimeIdentifiers>
<!-- 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>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.targets))\Directory.Build.targets" />

<Target Name="CleanPublishDir" AfterTargets="CoreClean">
<RemoveDir Directories="$(PublishDir)" />
</Target>
Expand Down