Actual behavior
f25bc2d updated MessagePack version from 2.2.x to 2.3.x which has some breaking changes regarding serialization of Dictionary<>.
Simple example fails to generate sources inside VisualStudio:
CSC : warning CS8785: Generator 'SourceGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'MessagePackSerializationException' with message 'Failed to deserialize System.Collections.Generic.Dictionary2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[Microsoft.Windows.SDK.Win32Docs.ApiDetails, Microsoft.Windows.SDK.Win32Docs, Version=0.1.4.39555, Culture=neutral, PublicKeyToken=7c40c7c34b1fcfe1]] value.
Compiling project from command line with dotnet build works without problem - that's probably why all automatic tests also works.
I've recompiled CsWin32 with MessagePack version downgraded to 2.2.x and it works again.
Repro steps
NativeMethods.txt content:
- Empty console project with
using Windows.Win32;
Context
- CsWin32 version: 0.1.539-beta
- Target Framework: net5.0
- VisualStudio: 2019 and 2022
Actual behavior
f25bc2d updated MessagePack version from
2.2.xto2.3.xwhich has some breaking changes regarding serialization ofDictionary<>.Simple example fails to generate sources inside VisualStudio:
CSC : warning CS8785: Generator 'SourceGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'MessagePackSerializationException' with message 'Failed to deserialize System.Collections.Generic.Dictionary2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[Microsoft.Windows.SDK.Win32Docs.ApiDetails, Microsoft.Windows.SDK.Win32Docs, Version=0.1.4.39555, Culture=neutral, PublicKeyToken=7c40c7c34b1fcfe1]] value.Compiling project from command line with
dotnet buildworks without problem - that's probably why all automatic tests also works.I've recompiled CsWin32 with MessagePack version downgraded to
2.2.xand it works again.Repro steps
NativeMethods.txtcontent:using Windows.Win32;Context