You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[AoT] Compile error if only one StaticContext exist and in global namespace #1031
Describe the bug
In the project, if there is a unique class with YamlStaticContext attribute, and this class is in the global namespace, while there are other classes with YamlSerializable attribute, the compilation will fail.
To Reproduce
Create a C# console project and enable NativeAoT publish. ( Dont trigger Do not use top-level statements)
Add necessary package from nuget. (YamlDotNet and Vecc.YamlDotNet.Analyzers.StaticGenerator)
Activity
fix aaubry#1031
fix aaubry#1031
EdwardCooke commentedon Jan 18, 2025
I’ll be sure to merge in that or with the next release. I’m thinking it’ll be this weekend if I have time.
dogdie233 commentedon Jan 19, 2025
Thank you, i put my context in a namespace as a temporary fix
docs: aaubry/YamlDotNet#1031
Merge pull request #1033 from dogdie233/fix-1031
aaubry commentedon Apr 10, 2026
A fix for this issue has been released in version 17.0.0.
aaubry commentedon Apr 10, 2026
A fix for this issue has been released in version 17.0.0.