agentleFS
mag1artmag1art/skills/dotnet-version-guide/SKILL.md

dotnet-version-guide

Skill1 starsChanged 3 months agoApache-2.0View on GitHub

Use when choosing, upgrading, or maintaining a specific .NET Core/.NET and C# version, or when explaining version-specific APIs and migration risks.

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. About 0 are common, 13 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use when explaining differences between .NET Core 3.1, .NET 5, .NET 6, .NET 7, .NET 8, .NET 9, and .NET 10.

    line 27
  2. Distinctive:

    Do not recommend an upgrade from version numbers alone.

    line 31
  3. Distinctive:

    Check dependencies before migration because later hosting and configuration patterns differ.

    line 54
  4. Distinctive:

    Use the new SDK templates as a reference, but do not assume upgrading rewrites existing code.

    line 66
  5. Distinctive:

    Treat Native AOT, trimming, and reflection-heavy libraries as an explicit compatibility project.

    line 72
  6. Distinctive:

    Use the official version pages for detailed APIs and breaking changes:

    line 95
  7. Very specific:

    Read TargetFramework, global.json, LangVersion, package versions, container image, and deployment runtime.

    line 106
  8. Distinctive:

    Check breaking changes for every skipped runtime version.

    line 108
  9. Distinctive:

    Prefer the existing project style when backporting a feature.

    line 109
  10. Distinctive:

    Keep Microsoft.Extensions, ASP.NET Core, EF Core, and provider major versions aligned with the target runtime.

    line 111
  11. Distinctive:

    Test publishing, trimming, Native AOT, containers, and OS-specific behavior separately when applicable.

    line 113
  12. Distinctive:

    Read official breaking-change pages and provider migration notes.

    line 119
  13. Very specific:

    Update global.json, project files, Docker images, CI images, and deployment manifests together.

    line 120
  14. Distinctive:

    Run restore, format/analyzers, build, unit tests, integration tests, contract tests, and smoke tests.

    line 121
  15. Distinctive:

    Document intentional behavior changes and rollback steps.

    line 123
  16. Very specific:

    When answering a version question, state the detected target and SDK, requested target, immediately available features, required …

    line 127

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

.NET Version Guide

When to Use

Use when explaining differences between .NET Core 3.1, .NET 5, .NET 6, .NET 7, .NET 8, .NET 9, and .NET 10; selecting a target framework; applying version-specific features; or planning an upgrade.

When Not to Use

Do not recommend an upgrade from version numbers alone. Inspect the repository, deployment runtime, package compatibility, operating systems, database providers, and support requirements first.

Version Map

RuntimeC#Release profilePractical focus
.NET Core 3.18Legacy LTSMaintenance only; plan migration
.NET 59Legacy STSUnified .NET line; do not start new work
.NET 610Legacy LTSMinimal APIs, hot reload, source generation, mature microservices baseline
.NET 711Legacy STSPerformance, Native AOT foundations, rate limiting, generic math, container publishing
.NET 812LTSBlazor Web App, improved Native AOT, time abstraction, modern production baseline
.NET 913STSCloud-native tooling, Aspire, AI abstractions, OpenAPI, performance
.NET 1014LTSCurrent LTS baseline, runtime/library improvements, C# 14, ASP.NET Core and EF Core updates

Support status changes. Check the official support policy before setting a production baseline: https://dotnet.microsoft.com/platform/support/policy/dotnet-core

Key Changes

.NET Core 3.1

  • Maintain existing applications; do not create new services on it.
  • Expect ASP.NET Core 3.1 hosting, Startup-based composition, endpoint routing, and System.Text.Json conventions.
  • Check dependencies before migration because later hosting and configuration patterns differ.

.NET 5

  • The separate Core naming ended for the unified runtime line: target net5.0 rather than netcoreapp5.0.
  • C# 9 introduced records, init-only setters, top-level statements, and improved pattern matching.
  • Single-file publishing and trimming were available but required compatibility testing.

.NET 6

  • LTS release with minimal APIs, hot reload, and C# 10 global usings and file-scoped namespaces.
  • System.Text.Json source generation and IAsyncEnumerable serialization became practical production tools.
  • Use the new SDK templates as a reference, but do not assume upgrading rewrites existing code.

.NET 7

  • Added generic math, Regex source generators, non-backtracking regular expressions, rate limiting APIs, and stronger Native AOT foundations.
  • The SDK added built-in container publishing and central package management.
  • Treat Native AOT, trimming, and reflection-heavy libraries as an explicit compatibility project.

.NET 8

  • LTS release and the preferred baseline for applications that cannot yet move to .NET 10.
  • Blazor Web Apps introduced the unified web-app model with static SSR and interactive render modes.
  • C# 12 added primary constructors and collection expressions.
  • Native AOT and ASP.NET Core support matured; verify reflection, serializers, DI registrations, and deployment assumptions.

.NET 9

  • Focused on cloud-native development and performance.
  • Added Aspire improvements, built-in OpenAPI generation, static asset fingerprinting, AI/vector-data abstractions, JSON schema support, CountBy, and AggregateBy.
  • C# 13 added params collections, the new Lock type, partial properties, and ref-struct improvements.

.NET 10

  • Current LTS line with C# 14.
  • Runtime and libraries improve JIT, Native AOT, JSON, cryptography, networking, diagnostics, and PipeReader scenarios.
  • C# 14 adds field-backed properties, extension blocks, null-conditional assignment, and additional operator/lambda improvements.
  • ASP.NET Core adds Blazor, OpenAPI, form-validation, diagnostics, memory-pool, and passkey improvements.
  • EF Core 10 adds named query filters and other LINQ/performance improvements.

Use the official version pages for detailed APIs and breaking changes:

Applying a Feature Safely

  1. Read TargetFramework, global.json, LangVersion, package versions, container image, and deployment runtime.
  2. Confirm the API belongs to the target runtime and not only to a newer SDK or package.
  3. Check breaking changes for every skipped runtime version.
  4. Prefer the existing project style when backporting a feature.
  5. For multi-targeting, use TargetFrameworks and small conditional sections such as NET8_0_OR_GREATER.
  6. Keep Microsoft.Extensions, ASP.NET Core, EF Core, and provider major versions aligned with the target runtime.
  7. Build and test every target framework in CI.
  8. Test publishing, trimming, Native AOT, containers, and OS-specific behavior separately when applicable.

Upgrade Checklist

  • Record current runtime, SDK, packages, hosting model, and deployment image.
  • Upgrade one major version at a time when the application is old or heavily coupled.
  • Read official breaking-change pages and provider migration notes.
  • Update global.json, project files, Docker images, CI images, and deployment manifests together.
  • Run restore, format/analyzers, build, unit tests, integration tests, contract tests, and smoke tests.
  • Compare startup, memory, throughput, database behavior, serialization, and logs.
  • Document intentional behavior changes and rollback steps.

Response Contract

When answering a version question, state the detected target and SDK, requested target, immediately available features, required target/package changes, breaking risks, exact project/CI/container changes, and validation commands.

Example: Target Framework and SDK Pinning

A project chooses its runtime and compiler independently but should keep them compatible:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <LangVersion>12.0</LangVersion>
    <Nullable>enable</Nullable>
  </PropertyGroup>
</Project>
{
  "sdk": {
    "version": "8.0.400",
    "rollForward": "latestFeature"
  }
}

During an upgrade, change the target framework, SDK image, CI runtime, package versions, deployment runtime, and tests together. Verify analyzers, serializers, EF providers, native dependencies, and hosting behavior before enabling new language features.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.