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

Update System.Text.Json to 5.0.2 #6784

Merged
merged 9 commits into from
Sep 1, 2021
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
2 changes: 1 addition & 1 deletion eng/Packages.props
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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" />
rainersigwald marked this conversation as resolved.
Show resolved Hide resolved
<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
Original file line number Diff line number Diff line change
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" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also add binding redirects for System.ValueTuple as we did for VS so that a 4.0.3.0 binding can load the 4.0.0.0 one from the GAC?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rainersigwald Thoughts?

I'm tempted to leave as-is. The binding redirects in VS were really just for tests ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Counter point: For consistency of devenv.exe and msbuild.exe ... it might make sense to have the same redirects.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the binding redirects in VS were not just for tests. Folks can reference 4.0.0.0 or 4.0.3.0 during compilation (among others). The CLR will not bind 4.0.3.0 to 4.0.0.0 (or 4.0.0.0 to 4.0.3.0) without binding redirects. VS must have redirects or else our very diverse codebase won't always run together. MSBuild tasks come from 3rd parties as well so IMO it behooves msbuild to have binding redirects for all the assemblies it ships (or doesn't by relying on the GAC) as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to have the binding redirect (we're trying to be consistent about that, see #6334) and also for it to be the same as VS's (down to 4.0.0.0).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed a change to do this (and pull it from our VSIX).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I meant they were just to get tests to pass since the runner couldn't pull in newer) but you're right! Sounds good!

</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
Original file line number Diff line number Diff line change
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
JakeRadMSFT marked this conversation as resolved.
Show resolved Hide resolved
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