Enable netstandard2.1 libraries to build (#10614)

This commit is contained in:
Brennan 2019-05-29 12:50:54 -07:00 committed by GitHub
parent e16aa29e67
commit cef57cb3ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 4 deletions

View File

@ -81,9 +81,12 @@
<ItemGroup>
<KnownFrameworkReference Update="Microsoft.NETCore.App">
<LatestRuntimeFrameworkVersion>$(MicrosoftNETCoreAppPackageVersion)</LatestRuntimeFrameworkVersion>
<DefaultRuntimeFrameworkVersion Condition="'$(IsServicingBuild)' != 'true'">$(MicrosoftNETCoreAppPackageVersion)</DefaultRuntimeFrameworkVersion>
<TargetingPackVersion Condition="'$(IsServicingBuild)' != 'true'">$(MicrosoftNETCoreAppPackageVersion)</TargetingPackVersion>
<!-- Always update the 'latest version', whether the repo is servicing or not. -->
<LatestRuntimeFrameworkVersion Condition="'%(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'">$(MicrosoftNETCoreAppPackageVersion)</LatestRuntimeFrameworkVersion>
<!-- Only update the default runtime version for preview builds. -->
<DefaultRuntimeFrameworkVersion Condition="'%(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' and '$(IsServicingBuild)' != 'true'">$(MicrosoftNETCoreAppPackageVersion)</DefaultRuntimeFrameworkVersion>
<!-- Only update the targeting pack version for preview builds. -->
<TargetingPackVersion Condition="'%(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' and '$(IsServicingBuild)' != 'true'">$(MicrosoftNETCoreAppPackageVersion)</TargetingPackVersion>
</KnownFrameworkReference>
<KnownFrameworkReference Condition="'$(UseAspNetCoreSharedRuntime)' != 'true'" Remove="Microsoft.AspNetCore.App" />
@ -95,6 +98,10 @@
<TargetingPackVersion Condition="'$(IsServicingBuild)' != 'true'">$(SharedFxVersion)</TargetingPackVersion>
</KnownFrameworkReference>
<KnownFrameworkReference Update="NETStandard.Library">
<TargetingPackVersion Condition="'%(TargetFramework)' == 'netstandard2.1' and '$(IsServicingBuild)' != 'true'">$(NETStandardLibraryRefPackageVersion)</TargetingPackVersion>
</KnownFrameworkReference>
</ItemGroup>
<!-- Copied from https://github.com/dotnet/arcade/blob/9d0fd805448082c8d55e2434607b481bca70a146/src/Microsoft.DotNet.Arcade.Sdk/tools/RepositoryInfo.targets#L12-L38 -->

View File

@ -83,7 +83,7 @@
These compilation references are necessary to compile netstandard2.0 assemblies which are in the shared framework.
This references are part of Microsoft.NETCore.App, so are listed here as references to be used during compilation only.
-->
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1'">
<_CompilationOnlyReference Include="System.Buffers" />
<_CompilationOnlyReference Include="System.ComponentModel.Annotations" />
<_CompilationOnlyReference Include="System.Runtime.CompilerServices.Unsafe" />

View File

@ -377,6 +377,10 @@
<Uri>https://github.com/dotnet/core-setup</Uri>
<Sha>20426e8c486d8715337cb6438ec70bc3619a514d</Sha>
</Dependency>
<Dependency Name="NETStandard.Library.Ref" Version="2.1.0-preview6-27723-08" CoherentParentDependency="Microsoft.Extensions.Logging">
<Uri>https://github.com/dotnet/core-setup</Uri>
<Sha>20426e8c486d8715337cb6438ec70bc3619a514d</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<!-- Listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->

View File

@ -25,6 +25,7 @@
<!-- Packages from dotnet/core-setup -->
<MicrosoftExtensionsDependencyModelPackageVersion>3.0.0-preview6-27723-08</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftNETCoreAppPackageVersion>3.0.0-preview6-27723-08</MicrosoftNETCoreAppPackageVersion>
<NETStandardLibraryRefPackageVersion>2.1.0-preview6-27723-08</NETStandardLibraryRefPackageVersion>
<!-- Packages from dotnet/corefx -->
<MicrosoftCSharpPackageVersion>4.6.0-preview6.19273.5</MicrosoftCSharpPackageVersion>
<MicrosoftWin32RegistryPackageVersion>4.6.0-preview6.19273.5</MicrosoftWin32RegistryPackageVersion>