-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the working BinaryFormatter implementation to a NuGet package
This change makes System.Runtime.Serialization.Formatters.dll build for both NetCoreAppMinimum and NetCoreAppCurrent. * The NetCoreAppCurrent version has a copy of BinaryFormatter that unconditionally throws PNSE from calls to Serialize or Deserialize. * It is included in the shared runtime * It is permanently AssemblyVersion locked to 8.1 ("bigger than 8.0, smaller than 9.0") * It is not included in the new NuGet package. * The NetCoreAppMinimum version(s) are exactly what this library was in .NET 8 * The AppContext switch is still required to use it * These TFMs are included in a resurrected System.Runtime.Serialization.Formatters nupkg * The AssemblyVersion floats with the repository (so 9.0 now, and we could stop producing the package in 10... or make a 10.0 then)
- Loading branch information
Showing
22 changed files
with
260 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/libraries/System.Runtime.Serialization.Formatters/Directory.Build.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project> | ||
<Import Project="..\Directory.Build.targets" /> | ||
<PropertyGroup> | ||
|
||
<!-- | ||
The real implementation of this library is built for NetCoreAppMinimum, | ||
the NetCoreAppCurrent build has a non-functional copy of BinaryFormatter. | ||
The NetCoreAppCurrent build is only included in the shared runtime, | ||
and should always lose to the package for unification; so it is pinned | ||
at an assembly version that will always lose. | ||
--> | ||
<AssemblyVersion Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">8.1.0.0</AssemblyVersion> | ||
</PropertyGroup> | ||
</Project> |
4 changes: 2 additions & 2 deletions
4
...ystem.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
17 changes: 17 additions & 0 deletions
17
src/libraries/System.Runtime.Serialization.Formatters/src/PACKAGE.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## About | ||
|
||
Provides the legacy BinaryFormatter class for workloads which still require it. | ||
|
||
## Main Types | ||
|
||
The main types provided by this library are: | ||
|
||
* `System.Runtime.Serialization.Formatters.Binary.BinaryFormatter` | ||
|
||
## Additional Documentation | ||
|
||
* [Obsoletion Notice](https://aka.ms/binaryformatter) | ||
|
||
## Feedback & Contributing | ||
|
||
System.Runtime.Serialization.Formatters is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports are welcome at [the GitHub repository](https://github.com/dotnet/runtime). This package is considered legacy, and we only consider low-risk, high-impact fixes that are necessary to maintain functionality. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.