Skip to content

Commit

Permalink
Update System.Text.Json to 5.0.2 (#6784)
Browse files Browse the repository at this point in the history
Visual Studio recently updated STJ and we can follow suit.

https://dev.azure.com/devdiv/DevDiv/_git/VS/pullrequest/346604

Include binding redirect updates for STJ and its direct dependency
System.Text.Encodings.Web. Remove pkgdefs for them since they
are now delivered by VS itself.

Match the VS-side binding redirects for System.ValueTuple that force
the use of 4.0.0.0 in all cases. Stop carrying a copy, since it will now
always be found in the GAC as part of .NET 4.7.2+, required by VS.

https://devdiv.visualstudio.com/DevDiv/_git/VS?path=%2Fsrc%2Fappid%2Fcommon%2Fcorefx.config.ttinclude&version=GBmain&line=93&lineEnd=101&lineStartColumn=1&lineEndColumn=29&lineStyle=plain&_a=contents

Co-authored-by: Rainer Sigwald <raines@microsoft.com>
  • Loading branch information
JakeRadMSFT and rainersigwald committed Sep 1, 2021
1 parent f6cf118 commit 596f08d
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 25 deletions.
2 changes: 1 addition & 1 deletion eng/Packages.props
Expand Up @@ -35,7 +35,7 @@
<PackageReference Update="System.Security.Permissions" Version="4.7.0" />
<PackageReference Update="System.Security.Principal.Windows" Version="4.7.0" />
<PackageReference Update="System.Text.Encoding.CodePages" Version="4.0.1" />
<PackageReference Update="System.Text.Json" Version="4.7.0" />
<PackageReference Update="System.Text.Json" Version="5.0.2" />
<PackageReference Update="System.Threading.Tasks.Dataflow" Version="4.9.0" />
<PackageReference Update="xunit.assert" Version="$(XUnitVersion)" />
<PackageReference Update="xunit.console" Version="$(XUnitVersion)" />
Expand Down
7 changes: 0 additions & 7 deletions src/Build/System.Text.Encodings.Web.pkgdef

This file was deleted.

7 changes: 0 additions & 7 deletions src/Build/System.Text.Json.pkgdef

This file was deleted.

6 changes: 6 additions & 0 deletions src/MSBuild/MSBuild.csproj
Expand Up @@ -25,11 +25,17 @@

<UseVSHostingProcess>false</UseVSHostingProcess>
<ApplicationManifest>MSBuild.exe.manifest</ApplicationManifest>

<AppConfig>app.config</AppConfig>
<!-- Temporary solution for
https://github.com/Microsoft/msbuild/issues/834 Long term
two files should be generated from a single source. -->
<AppConfig Condition="'$(Platform)' == 'x64'">app.amd64.config</AppConfig>
<!-- Disable binding redirect generation: we want to be deliberate
about the redirects we expose plugins to, and we explicitly
redirect ValueTuple _down_ to match VS. -->
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>

<IsPackable>true</IsPackable>
<ContentTargetFolders>contentFiles</ContentTargetFolders>
<BuildOutputTargetFolder>contentFiles\any\</BuildOutputTargetFolder>
Expand Down
9 changes: 6 additions & 3 deletions src/MSBuild/app.amd64.config
Expand Up @@ -92,11 +92,11 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Encodings.Web" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.1" newVersion="5.0.0.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.2" newVersion="5.0.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Threading.Tasks.Dataflow" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
Expand All @@ -108,7 +108,10 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
<!-- It is unusual to redirect down, but in this case it's ok: 4.0.3.0 forwards
to 4.0.0.0 in the GAC, so this just removes the need to redistribute a file
and makes that resolution faster. -->
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.0.0" />
</dependentAssembly>

<!-- Redirects for components dropped by Visual Studio -->
Expand Down
9 changes: 6 additions & 3 deletions src/MSBuild/app.config
Expand Up @@ -82,11 +82,11 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Encodings.Web" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.1" newVersion="5.0.0.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.2" newVersion="5.0.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Threading.Tasks.Dataflow" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
Expand All @@ -98,7 +98,10 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
<!-- It is unusual to redirect down, but in this case it's ok: 4.0.3.0 forwards
to 4.0.0.0 in the GAC, so this just removes the need to redistribute a file
and makes that resolution faster. -->
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.0.0" />
</dependentAssembly>

<!-- Redirects for components dropped by Visual Studio -->
Expand Down
4 changes: 0 additions & 4 deletions src/Package/MSBuild.VSSetup/files.swr
Expand Up @@ -42,7 +42,6 @@ folder InstallDir:\MSBuild\Current\Bin
file source=$(X86BinPath)Microsoft.Bcl.AsyncInterfaces.dll vs.file.ngenApplications="[installDir]\MSBuild\Current\Bin\MSBuild.exe" vs.file.ngenArchitecture=all vs.file.ngenPriority=1
file source=$(X86BinPath)System.Text.Encodings.Web.dll vs.file.ngenApplications="[installDir]\MSBuild\Current\Bin\MSBuild.exe" vs.file.ngenArchitecture=all vs.file.ngenPriority=1
file source=$(X86BinPath)System.Threading.Tasks.Extensions.dll vs.file.ngenApplications="[installDir]\MSBuild\Current\Bin\MSBuild.exe" vs.file.ngenArchitecture=all vs.file.ngenPriority=1
file source=$(X86BinPath)System.ValueTuple.dll vs.file.ngenApplications="[installDir]\MSBuild\Current\Bin\MSBuild.exe" vs.file.ngenArchitecture=all vs.file.ngenPriority=1
file source=$(X86BinPath)System.Numerics.Vectors.dll vs.file.ngenApplications="[installDir]\MSBuild\Current\Bin\MSBuild.exe" vs.file.ngenArchitecture=all vs.file.ngenPriority=1
file source=$(X86BinPath)System.Resources.Extensions.dll vs.file.ngenApplications="[installDir]\MSBuild\Current\Bin\MSBuild.exe" vs.file.ngenArchitecture=all vs.file.ngenPriority=1
file source=$(X86BinPath)System.Runtime.CompilerServices.Unsafe.dll vs.file.ngenApplications="[installDir]\MSBuild\Current\Bin\MSBuild.exe" vs.file.ngenArchitecture=all vs.file.ngenPriority=1
Expand Down Expand Up @@ -187,7 +186,6 @@ folder InstallDir:\MSBuild\Current\Bin\amd64
file source=$(X86BinPath)Microsoft.Bcl.AsyncInterfaces.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)System.Text.Encodings.Web.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)System.Threading.Tasks.Extensions.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)System.ValueTuple.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)System.Numerics.Vectors.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)System.Resources.Extensions.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)System.Runtime.CompilerServices.Unsafe.dll vs.file.ngenArchitecture=all
Expand Down Expand Up @@ -310,8 +308,6 @@ folder InstallDir:\Common7\IDE\CommonExtensions\MSBuild
file source=$(SourceDir)Package\MSBuild.VSSetup\MSBuild.clientenabledpkg
file source=$(SourceDir)Framework\Microsoft.Build.Framework.pkgdef
file source=$(SourceDir)Build\Microsoft.Build.pkgdef
file source=$(SourceDir)Build\System.Text.Encodings.Web.pkgdef
file source=$(SourceDir)Build\System.Text.Json.pkgdef
file source=$(SourceDir)StringTools\StringTools.pkgdef
file source=$(SourceDir)Tasks\Microsoft.Build.Tasks.Core.pkgdef
file source=$(SourceDir)Tasks\System.Resources.Extensions.pkgdef
Expand Down

0 comments on commit 596f08d

Please sign in to comment.