GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix CS8669 warning in generated MessagePack.GeneratedMessagePackResolver.g.cs by Copilot · Pull Request #2279 · MessagePack-CSharp/MessagePack-CSharp

Conversation

Copilot AI commented Jul 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

The generated MessagePack.GeneratedMessagePackResolver.g.cs emits CS8669 warnings when user types contain nullable reference type annotations in generic arguments (e.g., List<SomeClass?>), because the resolver template was missing the #pragma warning disable CS8669 already present in all formatter-generated files.

The resolver generates expressions like:

{ typeof(global::System.Collections.Generic.List<global::TempProject.SomeClass?>), 0 },

Without a nullable context or suppression, this triggers CS8669.

Changes

  • ResolverTemplate.tt / ResolverTemplate.cs — Added #pragma warning disable CS8669 // We may leak nullable annotations into generated code. matching the pattern already used in FormatterTemplate.tt
  • Resource files — Updated all 86+ MessagePack.GeneratedMessagePackResolver.g.cs test resource files to include the new pragma line
  • New test — NullableReferenceTypeInListFormatter reproduces the exact scenario from the issue: a [MessagePackObject] with a required List<SomeClass?> Values property, verifying no diagnostics are emitted and the generated resolver contains the pragma

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Initial plan
dcd441b
Copilot AI assigned Copilot and AArnott Jul 8, 2026
Copilot started work on behalf of AArnott July 8, 2026 01:39
View session
Copilot AI linked an issue Jul 8, 2026 that may be closed by this pull request
Unexpected warning CS8669: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source. #2180
Closed
Copilot AI added 2 commits July 8, 2026 01:59
Fix CS8669 warning in generated resolver file by adding pragma warnin…
b0c1597
…g disable
Apply remaining changes
f474111
Copilot AI changed the title [WIP] Fix CS8669 warning in auto-generated MessagePack code Fix CS8669 warning in generated MessagePack.GeneratedMessagePackResolver.g.cs Jul 8, 2026
Copilot AI requested a review from AArnott July 8, 2026 02:03
Copilot finished work on behalf of AArnott July 8, 2026 02:03
@AArnott
refine
dce7dad
AArnott
AArnott approved these changes Jul 8, 2026
View reviewed changes
@AArnott
AArnott marked this pull request as ready for review July 8, 2026 21:13
@AArnott AArnott added this to the v3.1 milestone Jul 8, 2026
@AArnott
AArnott enabled auto-merge (squash) July 8, 2026 21:13
@AArnott
AArnott merged commit 3df413b into master Jul 8, 2026
3 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@AArnott
AArnott deleted the copilot/fix-warn-cs8669-issue branch July 8, 2026 21:15
This was referenced Sep 18, 2026
Bump MessagePack from 2.5.301 to 3.1.9 SadPossum/GMA-Skeleton#42
Closed
deps: Bump MessagePack from 3.1.8 to 3.1.9 Jaxelr/Carter.Cache#410
Closed
Bump the other group with 4 updates TheSevenPens/OpenTabletArtist#749
Closed
Bump the rpc group with 2 updates TheSevenPens/OpenTabletArtist#755
Closed
Bump MessagePack from 3.1.7 to 3.1.9 rogerbriggen/aspire_otel_test#97
Open
Bump MessagePack from 3.1.7 to 3.1.9 LLM-Dev-Studio/ai-dev#101
Closed
Bump the nuget group with 10 updates dotnet/docs#56226
Merged
This was referenced Sep 26, 2026
Bump MessagePack from 2.5.301 to 3.1.10 neo-project/neo-express#867
Closed
Bump MessagePack from 3.1.7 to 3.1.10 LLM-Dev-Studio/ai-dev#104
Closed
build(deps): Bump MessagePack from 2.5.301 to 3.1.10 NewVixSmart/NewVix_ERP#13
Closed
Bump MessagePack from 2.5.302 to 3.1.10 feiwche/finara#20
Open
chore(deps): Bump MessagePack from 2.5.302 to 3.1.9 Tibirot/FieldKit#348
Closed
Bump MessagePack from 2.5.302 to 3.1.10 BurkeStrang/blog#111
Closed
This was referenced Nov 11, 2026
chore: Bump the nuget-updates group with 2 updates w1ck3ds0d4/GrainWallet#1
Closed
Bump the nuget group with 17 updates NikiforovAll/adaptive-rate-limiting-dotnet#16
Closed
Bump the nuget group with 1 update rian-be/FiveM.Nui#11
Merged
Bump the nuget group with 1 update TanmayS0406/SSMSClaude-Script#14
Closed
deps: Bump MessagePack from 2.5.307 to 3.1.12 RMBarros-Dev/Hydra-Digital-Shop#14
Closed
deps: Bump Aspire.Hosting.Redis and MessagePack RMBarros-Dev/Hydra-Digital-Shop#12
Merged
Bump Avalonia and 11 others jeremychn/amarre#8
Closed
Bump the dotnet-major group with 8 updates chelomama-dev/finances-hub#32
Open
deps: Bump MessagePack from 2.5.307 to 3.1.12 erikdarlingdata/PerformanceStudio#715
Closed
Bump AWSSDK.S3 and 16 others PauloVianaR/ViverAppWeb#27
Closed
Bump the dotnet-dependencies group with 17 updates PauloVianaR/ViverAppWeb#28
Open
Bump MessagePack from 2.5.307 to 3.1.12 afernandes/DiscoveryDeviceAndroid#5
Open
Bump MessagePack from 2.5.307 to 3.1.12 ErikEJ/SqlServer.Rules#820
Closed
Bump MessagePack from 2.5.307 to 3.1.12 thekim1/kalla#837
Closed
Bump the nuget-major group with 9 updates Tjeerd-menno/nats-manager-ui#386
Closed
Bump MessagePack from 2.5.307 to 3.1.12 jonnymuir/Heliograph#34
Closed
Bump AWSSDK.S3 and 15 others PauloVianaR/ViverAppWeb#30
Open
Bump the nuget group with 5 updates Ki-Will/server#3
Open
This was referenced Nov 20, 2026
Bump the nuget-shipped group with 2 updates alexFinn97/scaffolder-for-optimizely#8
Closed
Bump the nuget group with 17 updates NikiforovAll/adaptive-rate-limiting-dotnet#17
Closed
Bump MessagePack from 3.1.7 to 3.1.9 IntelliTect/IntelliTect.AspNetCore.SignalR.SqlServer#26
Closed
Bump MessagePack from 2.5.307 to 3.1.12 Tjeerd-menno/nats-manager-ui#398
Merged
Bump the nuget group with 3 updates TanmayS0406/SSMSClaude-Script#17
Open
Bump MessagePack and 7 others chelomama-dev/finances-hub#34
Open
Bump AWSSDK.S3 and 15 others PauloVianaR/ViverAppWeb#32
Closed
Bump the dotnet-dependencies group with 16 updates PauloVianaR/ViverAppWeb#33
Open
Bump MessagePack from 2.5.303 to 3.1.12 mortenbrudvik/Obfy#43
Closed
deps: Bump the "weekly" group with 1 update across multiple ecosystems ftichy/MiniShop#192
Merged
This was referenced Nov 27, 2026
Bump MessagePack from 2.5.303 to 3.1.12 D-WIS/DWIS-Blackboard-Tests#45
Open
Bump the nuget group with 17 updates NikiforovAll/adaptive-rate-limiting-dotnet#18
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@AArnott AArnott AArnott approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@AArnott AArnott

Copilot code review Copilot

Labels

None yet

Projects

None yet

Milestone

v3.1

Development

Successfully merging this pull request may close these issues.

Unexpected warning CS8669: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@AArnott
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.