MessagePack.Annotations 4.0.0-preview.2

MessagePack.Annotations (migration shim)

In MessagePack v4 the attributes ([MessagePackObject], [Key], [IgnoreMember], [SerializationConstructor], [MessagePackFormatter]) and IMessagePackSerializationCallbackReceiver live in the MessagePack package itself. The source generator ships there too and runs on the assembly that declares the annotated types, so that assembly has to reference MessagePack anyway. An annotations-only reference is no longer a supported setup.

This package exists so that projects coming from v3 keep working:

  • The surviving types are type-forwarded to MessagePack, so using MessagePack; code compiles unchanged and the attribute types a pre-built v3 assembly references resolve (its formatter code, bound to v3's reader and writer, still cannot run on v4).
  • The package depends on MessagePack, so bumping its version brings the v4 runtime and source generator in.
  • Referencing the 4.x version keeps MessagePack.Annotations 3.x from sitting next to MessagePack 4.x, which would define every attribute twice (CS0433). NuGet does not do this on its own: MessagePack does not depend on this package (the dependency runs the other way), so a transitive 3.x reference from a v3-built library stays at 3.x until the consuming project adds an explicit PackageReference to MessagePack.Annotations 4.x.
  • The types v4 renamed or deleted ([Union], [MessagePackKnownFormatter], [MessagePackAssumedFormattable], [ExcludeFormatterFromSourceGeneratedResolver]) still exist here in their v3 shape, marked [Obsolete] with error: true. The compiler error text tells you the replacement.

Once your code compiles and no dependency built against v3 references MessagePack.Annotations any more, remove this package and reference MessagePack directly. Removing it earlier brings the transitive 3.x package back (CS0433, as above).

Showing the top 20 packages that depend on MessagePack.Annotations.

Packages Downloads
Microsoft.VisualStudio.ComponentModelHost
Package Description
15
MessagePack
Extremely Fast MessagePack(MsgPack) Serializer for C# (.NET Framework, .NET 6, Unity, Xamarin).
15
MessagePack
Extremely Fast MessagePack(MsgPack) Serializer for C#(.NET, .NET Core, Unity, Xamarin).
15
MessagePack
Extremely Fast MessagePack(MsgPack) Serializer for C#(.NET, .NET Core, Unity, Xamarin).
14
MessagePack
Extremely Fast MessagePack(MsgPack) Serializer for C# (.NET Framework, .NET 6, Unity, Xamarin).
14

.NET Standard 2.0

Version Downloads Last updated
4.0.0-rc.1 2 11/13/2026
4.0.0-preview.2 2 11/01/2026
4.0.0-preview.1 2 11/01/2026
3.1.12 2 11/01/2026
3.1.11 2 11/01/2026
3.1.10 4 09/28/2026
3.1.9 4 09/21/2026
3.1.8 5 07/24/2026
3.1.7 6 06/15/2026
3.1.6 6 06/15/2026
3.1.5 6 06/15/2026
3.1.4 12 07/09/2025
3.1.3 14 05/25/2025
3.1.2 14 05/25/2025
3.1.1 14 05/25/2025
3.1.0 14 05/25/2025
3.0.308 14 05/28/2025
3.0.300 14 05/27/2025
3.0.238-rc.1 14 05/28/2025
3.0.233-rc.1 14 05/28/2025
3.0.214-rc.1 14 05/28/2025
3.0.208-rc-0001 14 05/28/2025
3.0.134-beta 14 05/28/2025
3.0.129-beta 14 05/28/2025
3.0.111-alpha 13 05/27/2025
3.0.54-alpha 14 05/28/2025
2.6.100-alpha 14 05/28/2025
2.6.95-alpha 14 05/28/2025
2.5.307 2 11/01/2026
2.5.305 4 09/28/2026
2.5.303 4 09/21/2026
2.5.302 6 06/15/2026
2.5.301 6 06/15/2026
2.5.205 5 06/15/2026
2.5.198 14 05/28/2025
2.5.192 14 05/28/2025
2.5.187 14 05/28/2025
2.5.172 14 05/28/2025
2.5.171 14 05/28/2025
2.5.168 14 05/28/2025
2.5.140 14 05/28/2025
2.5.129 14 05/28/2025
2.5.124 14 05/28/2025
2.5.108 14 05/28/2025
2.5.103 14 05/28/2025
2.5.94 14 05/28/2025
2.5.64-alpha 14 05/28/2025
2.4.59 14 05/28/2025
2.4.35 14 05/28/2025
2.4.23-alpha 14 05/28/2025
2.4.14-alpha 14 05/28/2025
2.3.112 14 05/28/2025
2.3.85 13 05/28/2025
2.3.75 14 05/28/2025
2.3.73-alpha 14 05/28/2025
2.3.58-alpha 14 05/28/2025
2.2.113 15 05/28/2025
2.2.85 14 05/28/2025
2.2.60 14 05/28/2025
2.2.44-rc 14 05/28/2025
2.2.36-alpha 14 05/28/2025
2.1.194 14 05/28/2025
2.1.165 14 05/28/2025
2.1.152 14 05/28/2025
2.1.143 14 05/28/2025
2.1.115 14 05/28/2025
2.1.90 14 05/28/2025
2.1.80 14 05/28/2025
2.0.335 14 05/23/2025
2.0.323 15 05/28/2025
2.0.299-rc 14 05/28/2025
2.0.270-rc 14 05/28/2025
2.0.231-rc 14 05/28/2025
2.0.221-beta 14 05/28/2025
2.0.204-beta 14 05/28/2025
2.0.171-beta 14 05/28/2025
2.0.123-beta 14 05/28/2025
2.0.119-beta 13 05/28/2025