Move from Microsoft.Bcl.Json.Sources to System.Text.Json (#9836)

- fix downgrade of CoreFx packages in core-sdk
- change eng/SharedFramework.Externsl.props
- remove System.Buffers and System.Runtime.CompilerServices.Unsafe references
  - System.Text.Json brings them in transitively
  - suppress baseline warning about System.Buffers
- remove more references from Microsoft.AspNetCore.SignalR.Protocols.Json project
  - Microsoft.AspNetCore.SignalR.Common brings necessary .NET Standard 2.0 packages in transitively
- regenerate ref project files

details:
- CoreFx no longer produces the Microsoft.Bcl.Json.Sources package
- System.Text.Json is now .NET Standard 2.0-compatible
- see also dotnet/corefx#37129 and aspnet/Extensions#1610
This commit is contained in:
Doug Bunting 2019-04-29 21:21:00 -07:00 committed by GitHub
parent 24735e6f39
commit ae5b1135f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 17 additions and 27 deletions

View File

@ -42,7 +42,6 @@ and are generated based on the last package release.
<LatestPackageReference Include="Microsoft.AspNetCore.Testing" Version="$(MicrosoftAspNetCoreTestingPackageVersion)" />
<LatestPackageReference Include="Microsoft.Azure.KeyVault" Version="$(MicrosoftAzureKeyVaultPackageVersion)" />
<LatestPackageReference Include="Microsoft.Azure.Storage.Blob" Version="$(MicrosoftAzureStorageBlobPackageVersion)" />
<LatestPackageReference Include="Microsoft.Bcl.Json.Sources" Version="$(MicrosoftBclJsonSourcesPackageVersion)" />
<LatestPackageReference Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildFrameworkPackageVersion)" />
<LatestPackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildUtilitiesCorePackageVersion)" />
<LatestPackageReference Include="Microsoft.CodeAnalysis.Common" Version="$(MicrosoftCodeAnalysisCommonPackageVersion)" />
@ -157,6 +156,7 @@ and are generated based on the last package release.
<LatestPackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsPackageVersion)" />
<LatestPackageReference Include="System.ServiceProcess.ServiceController" Version="$(SystemServiceProcessServiceControllerPackageVersion)" />
<LatestPackageReference Include="System.Text.Encodings.Web" Version="$(SystemTextEncodingsWebPackageVersion)" />
<LatestPackageReference Include="System.Text.Json" Version="$(SystemTextJsonPackageVersion)" />
<LatestPackageReference Include="System.Threading.Channels" Version="$(SystemThreadingChannelsPackageVersion)" />
<LatestPackageReference Include="System.Threading.Tasks.Extensions" Version="$(SystemThreadingTasksExtensionsPackageVersion)" />
<LatestPackageReference Include="Utf8Json" Version="$(Utf8JsonPackageVersion)" />

View File

@ -89,6 +89,7 @@
<_CompilationOnlyReference Include="System.Buffers" />
<_CompilationOnlyReference Include="System.ComponentModel.Annotations" />
<_CompilationOnlyReference Include="System.Runtime.CompilerServices.Unsafe" />
<_CompilationOnlyReference Include="System.Text.Json" />
</ItemGroup>
<!--

View File

@ -285,10 +285,6 @@
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>b38492576f2ad4025dda6ad49a83324804f9ff9c</Sha>
</Dependency>
<Dependency Name="Microsoft.Bcl.Json.Sources" Version="4.6.0-preview6.19222.12" CoherentParentDependency="Microsoft.NETCore.App">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a78bd0c13887e26372aafdffb8f06be26563c4a8</Sha>
</Dependency>
<Dependency Name="Microsoft.CSharp" Version="4.6.0-preview6.19229.2" CoherentParentDependency="Microsoft.NETCore.App">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>7066a0cac2cadd21ca144cc78d1b1fab9b1f9cd7</Sha>
@ -357,6 +353,10 @@
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>7066a0cac2cadd21ca144cc78d1b1fab9b1f9cd7</Sha>
</Dependency>
<Dependency Name="System.Text.Json" Version="4.6.0-preview6.19229.2" CoherentParentDependency="Microsoft.NETCore.App">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>7066a0cac2cadd21ca144cc78d1b1fab9b1f9cd7</Sha>
</Dependency>
<Dependency Name="System.Threading.Channels" Version="4.6.0-preview6.19229.2" CoherentParentDependency="Microsoft.NETCore.App">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>7066a0cac2cadd21ca144cc78d1b1fab9b1f9cd7</Sha>

View File

@ -22,7 +22,6 @@
<MicrosoftExtensionsDependencyModelPackageVersion>3.0.0-preview6-27629-07</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftNETCoreAppPackageVersion>3.0.0-preview6-27629-07</MicrosoftNETCoreAppPackageVersion>
<!-- Packages from dotnet/corefx -->
<MicrosoftBclJsonSourcesPackageVersion>4.6.0-preview6.19222.12</MicrosoftBclJsonSourcesPackageVersion>
<MicrosoftCSharpPackageVersion>4.6.0-preview6.19229.2</MicrosoftCSharpPackageVersion>
<MicrosoftWin32RegistryPackageVersion>4.6.0-preview6.19229.2</MicrosoftWin32RegistryPackageVersion>
<SystemComponentModelAnnotationsPackageVersion>4.6.0-preview6.19229.2</SystemComponentModelAnnotationsPackageVersion>
@ -40,6 +39,7 @@
<SystemSecurityPrincipalWindowsPackageVersion>4.6.0-preview6.19229.2</SystemSecurityPrincipalWindowsPackageVersion>
<SystemServiceProcessServiceControllerPackageVersion>4.6.0-preview6.19229.2</SystemServiceProcessServiceControllerPackageVersion>
<SystemTextEncodingsWebPackageVersion>4.6.0-preview6.19229.2</SystemTextEncodingsWebPackageVersion>
<SystemTextJsonPackageVersion>4.6.0-preview6.19229.2</SystemTextJsonPackageVersion>
<SystemThreadingChannelsPackageVersion>4.6.0-preview6.19229.2</SystemThreadingChannelsPackageVersion>
<!-- Only listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
<MicrosoftNETCorePlatformsPackageVersion>3.0.0-preview6.19229.2</MicrosoftNETCorePlatformsPackageVersion>

View File

@ -6,9 +6,7 @@
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<Compile Include="Microsoft.AspNetCore.Http.Connections.Common.netstandard2.0.cs" />
<Reference Include="Microsoft.AspNetCore.Connections.Abstractions" />
<Reference Include="Microsoft.Bcl.Json.Sources" />
<Reference Include="System.Buffers" />
<Reference Include="System.Runtime.CompilerServices.Unsafe" />
<Reference Include="System.Text.Json" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<Compile Include="Microsoft.AspNetCore.Http.Connections.Common.netcoreapp3.0.cs" />

View File

@ -20,14 +20,15 @@
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'" >
<Reference Include="Microsoft.Bcl.Json.Sources" />
<Reference Include="System.Buffers" />
<Reference Include="System.Runtime.CompilerServices.Unsafe" />
<Reference Include="System.Text.Json" />
</ItemGroup>
<ItemGroup Condition="'$(AspNetCoreMajorMinorVersion)' == '3.0'">
<!-- This dependency was replaced by System.Text.Json between 3.0 and 2.2. This suppression can be removed after 3.0 is complete. -->
<SuppressBaselineReference Include="Newtonsoft.Json" />
<!-- System.Text.Json (for .NET Standard 2.0) and ShardFx bring System.Buffers in (transitively). No need for both here. -->
<SuppressBaselineReference Include="System.Buffers" />
</ItemGroup>
</Project>

View File

@ -6,9 +6,6 @@
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<Compile Include="Microsoft.AspNetCore.SignalR.Protocols.Json.netstandard2.0.cs" />
<Reference Include="Microsoft.AspNetCore.SignalR.Common" />
<Reference Include="Microsoft.Bcl.Json.Sources" />
<Reference Include="System.Buffers" />
<Reference Include="System.Runtime.CompilerServices.Unsafe" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<Compile Include="Microsoft.AspNetCore.SignalR.Protocols.Json.netcoreapp3.0.cs" />

View File

@ -22,12 +22,6 @@
<Reference Include="Microsoft.AspNetCore.SignalR.Common" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<Reference Include="Microsoft.Bcl.Json.Sources" />
<Reference Include="System.Buffers" />
<Reference Include="System.Runtime.CompilerServices.Unsafe" />
</ItemGroup>
<ItemGroup Condition="'$(AspNetCoreMajorMinorVersion)' == '3.0'">
<!-- This dependency was replaced by System.Text.Json between 3.0 and 2.2. This suppression can be removed after 3.0 is complete. -->
<SuppressBaselineReference Include="Newtonsoft.Json" />

View File

@ -7,9 +7,7 @@
<Compile Include="Microsoft.AspNetCore.SignalR.Common.netstandard2.0.cs" />
<Reference Include="Microsoft.AspNetCore.Connections.Abstractions" />
<Reference Include="Microsoft.Extensions.Options" />
<Reference Include="Microsoft.Bcl.Json.Sources" />
<Reference Include="System.Buffers" />
<Reference Include="System.Runtime.CompilerServices.Unsafe" />
<Reference Include="System.Text.Json" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<Compile Include="Microsoft.AspNetCore.SignalR.Common.netcoreapp3.0.cs" />

View File

@ -25,14 +25,15 @@
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<Reference Include="Microsoft.Bcl.Json.Sources" />
<Reference Include="System.Buffers" />
<Reference Include="System.Runtime.CompilerServices.Unsafe" />
<Reference Include="System.Text.Json" />
</ItemGroup>
<ItemGroup Condition="'$(AspNetCoreMajorMinorVersion)' == '3.0'">
<!-- This dependency was replaced by System.Text.Json between 3.0 and 2.2. This suppression can be removed after 3.0 is complete. -->
<SuppressBaselineReference Include="Newtonsoft.Json" />
<!-- System.Text.Json (for .NET Standard 2.0) and ShardFx bring System.Buffers in (transitively). No need for both here. -->
<SuppressBaselineReference Include="System.Buffers" />
</ItemGroup>
</Project>