SharpSerializer 4.0.2

dotnet add package SharpSerializer --version 4.0.2                
NuGet\Install-Package SharpSerializer -Version 4.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SharpSerializer" Version="4.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SharpSerializer --version 4.0.2                
#r "nuget: SharpSerializer, 4.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SharpSerializer as a Cake Addin
#addin nuget:?package=SharpSerializer&version=4.0.2

// Install SharpSerializer as a Cake Tool
#tool nuget:?package=SharpSerializer&version=4.0.2                

SharpSerializer 4.x

SharpSerializer is an open source XML and binary serializer for .NET. With only one line of code it can serialize types like: multidimensional array, nested array, array-of-arrays, polymorphic object (where value is inherited from the property type), generic type, generic listing (i.e. dictionary, collection) and many more...

Project URL:

License URL:



SharpSerializer requires .NET Framework 4.6.2 or a .NET platform implementing .NET Standard 2.0.

Below link contains a list with supported .NET implementations:
.NET Standard 2.0


From NuGet

Using NuGet is recommended.

In Visual Studio open NuGet Package Manager and type-in: Install-Package Polenter.SharpSerializer

In the Command Line (.NET CLI) use the dotnet command:

dotnet add package SharpSerializer

From a standalone file

The following libraries should be attached to your deployment package:

  • Polenter.SharpSerializer.dll


var obj = CreateMyVerySophisticatedObject();
var serializer = new SharpSerializer();
serializer.Serialize(obj, "test.xml");
var obj2 = serializer.Deserialize("test.xml");

There are more usage examples on the tutorial page:

Usage Limitations

SharpSerializer serializes only public properties. If you like to serialize fields or private properties, they have to be wrapped in public properties.

SharpSerializer can deserialize only types providing public or private default constructor.

Please refer to the following article for a workaround:

Breaking Changes

3.x → 4.x

Abandoned support for netstandard1.0, netstandard1.3, netcoreapp3.1 and net452.

Using .NET 8 in demo projects and in unit tests.

2.x → 3.x

All platforms below .NET Framework 4.5 are no more supported.

Support for Portable Class Library (PCL) was depreciated. The following file is no more deployed:

  • Polenter.SharpSerializer.Portable.dll

There are no breaking changes in the API in .NET Framework 4.5.2 and above.

There are no breaking changes in the API expected, if using PCL, however it's not thoroughly tested yet.

The BSD License (BSD) was changed to MIT License



cd ./SharpSerializer
dotnet build -c Release
dotnet pack -c Release
dotnet nuget push .\bin\Release\SharpSerializer.4.0.2.nupkg -k <your-nuget-api-key>


There are some tests concerning deploying and using SharpSerializer on different platforms, e.g. .NET Framework 4.5.2, .NET Core 1.0, 2.0 and Xamarin.
More tests on different platforms are however appreciated.

Additional contributors are welcome. Just change source code, create unit tests and request a pull.


Pawel Idzikowski, polenter (owner)


This project is licensed under the MIT License - see LICENSE.txt file for details.

The following copyright notice should be attached to your software (e.g. about box):

This software includes SharpSerializer - Copyright (c) 2010 Pawel Idzikowski
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.6.2

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (16)

Showing the top 5 NuGet packages that depend on SharpSerializer:

Package Downloads



S4S is a SDK that will allow you to create custom controls for your application enabling accessibility on them. This includes resizing the controls and their fontsize or enabling scroll helpers to remove the swipe motion.


Package Description


Package Description


Add message-based communication to your application easily using message brokers.

GitHub repositories (4)

Showing the top 4 popular GitHub repositories that depend on SharpSerializer:

Repository Stars
Deserialization payload generator for a variety of .NET formatters
Proxylogon & Proxyshell & Proxyoracle & Proxytoken & All exchange server history vulns summarization :)
Cross-platform 2D game engine focused on ultimate productivity built in .NET
Flexible layout tool for creating UI on any platform
Version Downloads Last updated
4.0.2 4,186 3/24/2024
3.0.2 99,083 12/28/2021
3.0.1 919,026 10/8/2017
2.20.0 251,135 3/21/2014
2.18.0 66,491 1/29/2012
2.16.0 31,675 11/9/2011
2.15.0 2,628 10/25/2011
2.14.0 2,563 10/23/2011
2.13.1 2,581 8/19/2011
2.13.0 3,095 8/6/2011
2.12.0 2,659 7/31/2011
2.11.0 2,656 7/28/2011
2.10.0 2,725 6/19/2011
2.9.0 13,251 5/9/2011

Support for .NET Standard 2.0 and .NET Framework 4.6.2.