Skip to content

Upgrade to .NET 11 and update all packages - #1485

Merged
ardalis merged 2 commits into
mainfrom
issue-1482-update-net11
Nov 15, 2026
Merged

ardalis merged 2 commits into
mainfrom
issue-1482-update-net11

Conversation

@ardalis

@ardalis ardalis commented Nov 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Upgrades the app to .NET 11 and updates all NuGet packages.

Framework

  • All projects → net11.0; global.json SDK 11.*
  • Both Dockerfiles → sdk:11.0 / aspnet:11.0
  • GitHub workflows → 11.0.x; .vscode/launch.json and README updated

Packages

  • Microsoft.* 10.x → 11.0.0; everything else → latest stable
  • AutoMapper 16.2.0 → 17.0.0 (also fixes GHSA-6vhm-j9h7-f9gh, GHSA-gpwp-5797-mjff)
  • SixLabors.ImageSharp removed. 2.1.13 has 5 unpatched advisories (2 high, reachable through avatar upload), and the fixed versions use the commercial Split License. Avatar resizing now uses SkiaSharp (MIT) + SkiaSharp.NativeAssets.Linux.NoDependencies for the Linux App Service.
  • Stripe.net stays pinned at 52.2.0 (webhook API version; see comment in props)
  • Removed NETStandard.Library and System.ComponentModel.Annotations from Core (NU1510 under net11)
  • Removed AddRazorRuntimeCompilation and its package (obsolete in net11, ASPDEPR003); use Hot Reload in dev
  • Removed 21 PackageVersion entries that no project referenced (FastEndpoints, OpenTelemetry/Aspire leftovers, SQLite, etc.). Aspire is tracked separately in Add .NET Aspire (AppHost + ServiceDefaults) to main #1484.

Avatar upload (EditAvatar)

  • New AvatarImageResizer: applies EXIF orientation, center-crops to 500×500 JPEG q80, fills transparent areas with white, strips metadata (no more GPS in public blobs)
  • Rejects images over 10,000 px per side or 40 MP before any pixels are decoded; downsamples during decode to keep memory low
  • A missing or invalid upload now shows a validation message instead of a 500
  • Accessibility: label bound to the input, accept filter, error message linked with aria-describedby / role="alert"

Tests

  • AvatarImageResizerTests: size/format for several inputs, wide and tall crop, transparency, all 8 EXIF orientations, metadata stripped, oversize rejection, invalid data, null
  • AutoMapperConfigurationTests: every Web profile loads and compiles under AutoMapper 17

Verification

  • dotnet build: succeeded (SDK 11.0.100)
  • dotnet test: 296 passed, 0 failed (Unit 175, Integration 118, Functional 3)
  • dotnet format --verify-no-changes: fails, as it already does on main. Main has ~11k existing violations (whitespace, imports, file-scoped namespaces in old migrations) under both SDK 10 and SDK 11. This PR adds none: the new files pass on their own, and the repo total went down slightly.
  • An independent agent reviewed the diff. Its findings were fixed, and the ones skipped are recorded with reasons in .claude/plans/2026-11-15-issue-1482-update-net11.md.

Follow-ups / known items

  • Transitive Microsoft.AspNetCore.WebUtilities 9.0.4 advisory comes in through NimblePros.Vimeo → NimblePros.ApiClient 2.1.2. It already exists on main, and Web resolves the framework copy at runtime. The fix is to bump NimblePros.Vimeo.
  • Identity UI Bootstrap 4 now gives an obsolete warning (not an error).
  • The Azure App Service needs the .NET 11 runtime. Deploy is self-contained linux-x64, so this should already work.

Fixes #1482

🤖 Generated with Claude Code

ardalis and others added 2 commits November 15, 2026 08:22
- Retarget all projects to net11.0; global.json SDK 11.*, Dockerfile, CI workflows, README
- Bump Microsoft packages to 11.0.0 and others to latest stable (Stripe.net stays pinned)
- Replace SixLabors.ImageSharp 2.1.13 (unpatched advisories) with SkiaSharp for avatar resize
- Extract AvatarImageResizer with unit tests
- Remove obsolete Razor runtime compilation (ASPDEPR003)
- Drop NETStandard.Library and System.ComponentModel.Annotations from Core (NU1510)
- Enable NimblePros workflow and dotnet plugins for the project

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ackages

- AvatarImageResizer: honor EXIF orientation, cap source at 10k px/side and 40 MP,
  downsample during decode, mipmapped sampling, strip metadata
- EditAvatar: show validation errors for missing/invalid uploads instead of a 500;
  bind label, accept filter, aria-described error
- Update src/DevBetterWeb.Web/Dockerfile, .vscode/launch.json and workflow step names to .NET 11
- Remove 21 PackageVersion entries no project references
- Add AutoMapper profile compile test and expanded resizer tests

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ardalis
ardalis merged commit 76e5937 into main Nov 15, 2026
2 checks passed
if (result != SKCodecResult.Success && result != SKCodecResult.IncompleteInput)
{
// The codec cannot scale to that size; decode at full size instead.
bitmap.Dispose();

if (result != SKCodecResult.Success && result != SKCodecResult.IncompleteInput)
{
bitmap.Dispose();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update to net11

2 participants