```bash
# dotnet-version-detection
Detects .NET version information from project files and provides version-specific guidance. This skill runs **first** before any .NET development work. All other skills depend on the detected version to adapt their guidance.
Cross-cutting skill referenced by [skill:dotnet-advisor] and virtually all specialist skills. See also [skill:dotnet-file-based-apps] for .NET 10+ file-based apps that run without a `.csproj`.
## Scope
- Reading TFM from .csproj, Directory.Build.props, and global.json
- Multi-targeting detection and highest-TFM selection
- SDK version detection and preview feature gating
- Version-specific API availability guidance
- C# language version mapping and support lifecycle reporting
## Out of scope
- Project structure analysis beyond TFM -- see [skill:dotnet-project-analysis]
- .NET 10 file-based apps without .csproj -- see [skill:dotnet-file-based-apps]
- Framework upgrade migration steps -- see [skill:dotnet-version-upgrade]
- Multi-targeting polyfills and conditional compilation -- see [skill:dotnet-multi-targeting]
---
## Fast Repository Scan (Optional)
For large repos, run the bundled scanner first to quickly inventory TFM/SDK signals before applying the precedence algorithm below:
```bash
python3 skills/dotnet-version-detection/scripts/scan-dotnet-targets.py --root . --json
```bash
Use the script output (`project_target_frameworks`, `global_json.sdk_version`, `workflow_dotnet_versions`) as discovery input. The precedence rules below remain authoritative for final TFM selection.
---
## Detection Precedence Algorithm
Read project files in this strict order. **Higher-numbered sources are lower priority.** Stop falling through once a TFM is resolved.
### 1. Direct `<TargetFramework>` in .csproj (highest priority)
Read the nearest `.csproj` file to the current working file/directory.
```xml
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>
```xml
If found **and the value is a literal TFM** (e.g., `net10.0`, not `$(SomeProperty)`), this is the authoritative TFM. Report it and proceed to additional detection (Step 5).
If the value is an MSBuild property expression (starts with `$(`), skip to **Step 4** for unresolved property handling.
### 2. `<TargetFrameworks>` in .csproj (multi-targeting)
```xml
<PropertyGroup>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
</PropertyGroup>
```xml
If found:
- Report **all** TFMs (semicolon-delimited)
- Guide based on the **highest** TFM (e.g., net10.0)
- Note polyfill needs for lower TFMs: "Consider [skill:dotnet-multi-targeting] for PolySharp/Polyfill to backport language features to net8.0"
- Proceed to additional detection (Step 5)
### 3. `Directory.Build.props` shared TFM
If no `<TargetFramework>` or `<TargetFrameworks>` found in the .csproj (or if the .csproj inherits from shared props), read `Directory.Build.props` in the current directory or any parent directory up to the solution root.
```xml
<!-- Directory.Build.props -->
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>
```xml
If found, use this as the TFM. Note: per-project `.csproj` values override `Directory.Build.props`.
### 4. MSBuild Property Expressions (fallback with warning)
If the TFM value is an MSBuild property expression rather than a literal:
```xml
<TargetFramework>$(MyCustomTfm)</TargetFramework>
```xml
Emit warning:
> **Warning: Unresolved MSBuild property `$(MyCustomTfm)`.** Cannot determine TFM statically. Falling back to SDK version from `global.json`.
Then fall through to `global.json` SDK version (Step 4a) or `dotnet --version` (Step 4b).
#### 4a. `global.json` SDK version
```json
{
"sdk": {
"version": "10.0.100"
}
}
```text
Map SDK version to approximate TFM:
- `8.0.xxx` -> net8.0
- `9.0.xxx` -> net9.0
- `10.0.xxx` -> net10.0
- `11.0.xxx-preview.x` -> net11.0
Report: "Inferred TFM from `global.json` SDK version. Verify actual TFM in project file."
#### 4b. `dotnet --version` (last resort)
If no `global.json` exists, use `dotnet --version` output to infer SDK version. Same mapping as 4a.
Report: "Inferred TFM from installed SDK version. No `global.json` or `.csproj` found. Consider creating a project with `dotnet new`."
---
## Additional Detection (Step 5)
After resolving the TFM, also check these files for supplementary version information. Always perform these checks regardless of which precedence step resolved the TFM.
### 5a. `global.json` SDK Version
Even if TFM was resolved from .csproj, read `global.json` for:
- `sdk.version` -- the pinned SDK version
- `sdk.rollForward` -- the rollForward policy (e.g., `latestFeature`, `latestPatch`)
Report the SDK version alongside the TFM. Flag inconsistencies:
> **Warning: TFM `net10.0` but `global.json` pins SDK `9.0.100`.** The project targets a newer framework than the pinned SDK. Update `global.json` or verify the build environment has the correct SDK.
### 5b. C# Language Version
Check for explicit `<LangVersion>` in .csproj or `Directory.Build.props`:
```xml
<LangVersion>preview</LangVersion>
```csharp
- If `preview` -- report "C# preview features enabled. Unlocks the next C# version available in the installed SDK (e.g., C# 15 preview features with a .NET 11 preview SDK)."
- If `latest` -- report the default C# version for the detected TFM
- If explicit version (e.g., `12.0`) -- report that version, warn if it's below the TFM default
- If absent -- use the default C# version for the TFM (see reference data below)
### 5c. Preview Feature Detection
Check for these properties in .csproj or `Directory.Build.props`:
**EnablePreviewFeatures:**
```xml
<EnablePreviewFeatures>true</EnablePreviewFeatures>
```xml
Report: ".NET preview features enabled. Access to preview APIs and types."
**Runtime-async feature flag (.NET 11+):**
```xml
<Features>$(Features);runtime-async=on</Features>
```xml
Report: "Runtime-async enabled. Async/await uses runtime-level execution instead of compiler state machines."
Note: runtime-async requires `<EnablePreviewFeatures>true</EnablePreviewFeatures>` as well.
### 5d. Multi-targeting Details
If multi-targeting was detected (Step 2), also note:
- Which TFMs are LTS vs STS vs Preview
- Which TFMs are approaching end-of-support
- Suggest [skill:dotnet-multi-targeting] for polyfill guidance
---
## Structured Output Format
After detection, present results in this structured format:
```text
.NET Version Detection Results
==============================
TFM: net10.0 (or net8.0;net10.0 for multi-targeting)
Highest TFM: net10.0
C# Version: 14 (default for net10.0)
SDK Version: 10.0.100 (from global.json)
Preview Features: none
Runtime-Async: not enabled
Warnings: none
Guidance: This project targets .NET 10 LTS with C# 14. Use modern patterns
including field-backed properties, collection expressions, and primary
constructors. All guidance will target net10.0 capabilities.
```csharp
For multi-targeting:
```text
.NET Version Detection Results
==============================
TFMs: net8.0;net10.0
Highest TFM: net10.0
C# Version: 14 (default for highest TFM)
SDK Version: 10.0.100 (from global.json)
Preview Features: none
Warnings: net8.0 reaches end of support Nov 2026
Guidance: Multi-targeting net8.0 and net10.0. Guide on net10.0 patterns.
For net8.0 compatibility, use PolySharp/Polyfill for language features.
See [skill:dotnet-multi-targeting] for detailed polyfill guidance.
```text
---
## Edge Cases
### No .csproj Found
If no `.csproj` exists in the workspace:
- Check for `.sln` or `.slnx` files and look for referenced projects
- If no project files found, continue the fallback chain:
1. Read `global.json` for SDK version (Step 4a) and infer TFM from it
2. If no `global.json`, use `dotnet --version` (Step 4b) to infer TFM
3. Only if both inference methods fail: "No .NET project or SDK detected. Defaulting guidance to net10.0 (current LTS). Use `dotnet new` to create a project."
### MSBuild Property Indirection
If `<TargetFramework>` contains `$(PropertyName)`:
- Emit: "**Unresolved property: `$(PropertyName)`.** Cannot determine TFM from static analysis."
- Fall back to `global.json` SDK version, then `dotnet --version`
- Recommend verifying TFM via `dotnet --list-sdks` or `dotnet msbuild -getProperty:TargetFramework`
### Inconsistent Files
If .csproj says `net10.0` but `global.json` pins SDK `9.0.100`:
- Prefer the .csproj TFM (higher precedence)
- Warn about the mismatch
- Suggest updating `global.json` to match
### No SDK Installed
If `dotnet --version` fails or is not found:
- Report: "No .NET SDK detected on this system. Install from https://dot.net"
- If project files exist, still report the TFM from project files
- Note that builds will fail without the SDK
### `.fsproj` and `.vbproj`
The same detection logic applies to F# (`.fsproj`) and VB.NET (`.vbproj`) projects. The `<TargetFramework>` element is identical across all .NET project types.
---
## Caching Behavior
Version detection results should be cached per-project (per .csproj path). Re-detect when:
- The user switches to a different project within the solution
- The user explicitly asks to re-detect
- A `.csproj`, `Directory.Build.props`, or `global.json` file is modified
---
## Version-to-Feature Reference Data
> **Last updated: 2026-02-11**
This reference data maps .NET versions to their C# language versions, key features, and support lifecycle. This section is **separate from the detection logic above** -- detection determines which version is in use; this data maps that version to available features.
### Version Matrix
| .NET Version | Status | C# Version | TFM | Support End | Notes |
|-------------|--------|-------------|-----|-------------|-------|
| .NET 8 | LTS (active) | C# 12 | net8.0 | Nov 2026 | Approaching end of support |
| .NET 9 | STS | C# 13 | net9.0 | May 2026 | Approaching end of support |
| .NET 10 | LTS (current) | C# 14 | net10.0 | Nov 2028 | Recommended for new projects |
| .NET 11 | Preview 1 | C# 15 (preview) | net11.0 | TBD (expected STS end: ~May 2028 if Nov 2026 GA) | Preview only -- not for production |
### C# Version Feature Highlights
**C# 12 (net8.0)**
- Primary constructors for classes/structs
- Collection expressions (`[1, 2, 3]`)
- `ref readonly` parameters
- Default lambda parameters
- Alias any type with `using`
- Inline arrays
- Interceptors (experimental)
**C# 13 (net9.0)**
- `params` collections (any collection type)
- `Lock` type (`System.Threading.Lock`)
- New escape sequence `\e`
- Method group natural type improvements
- Implicit indexer access in object initializers
- `ref` and `unsafe` in iterators/async
- Partial properties
**C# 14 (net10.0)**
- Field-backed properties (`field` contextual keyword)
- `nameof` for unbound generic types
- Extension improvements (extension blocks)
- First-class `Span<T>` in more contexts
- `allows ref struct` anti-constraint for generics
**C# 15 preview (net11.0)**
- Collection expression arguments (`with()` syntax for capacity/comparers):
```csharp
List<int> nums = [with(capacity: 32), 0, ..evens, ..odds];
HashSet<string> names = [with(comparer: StringComparer.OrdinalIgnoreCase), "Alice"];
- Additional features expected as .NET 11 progresses through preview
.NET 11 Preview 1 Notable Features
These features are available when net11.0 TFM is detected with preview features enabled:
- Runtime-async: Async/await at runtime level (requires
<EnablePreviewFeatures>true</EnablePreviewFeatures> +
<Features>$(Features);runtime-async=on</Features>)
- Zstandard compression:
System.IO.Compression.Zstandard (2-7x faster than Brotli/Deflate)
- BFloat16:
System.Numerics.BFloat16 for AI/ML workloads
- Happy Eyeballs:
ConnectAlgorithm.Parallel for dual-stack networking
- CoreCLR for Android: Default runtime for MAUI Android Release builds
- XAML source generation: Default in MAUI (replaces XAMLC)
- EF Core: Complex types + JSON columns with TPT/TPC inheritance
- CoreCLR on WASM: Experimental alternative to Mono for Blazor WASM
Support Lifecycle Guidance
When reporting version information, include lifecycle context:
- End-of-support approaching (within 6 months): Warn and suggest [skill:dotnet-version-upgrade]
- Preview/RC: Warn "not for production use" unless user explicitly opted in
- STS reaching end: Note shorter support window compared to LTS
- Current LTS: Confirm as recommended target for new projects
Code Navigation (Serena MCP)
Primary approach: Use Serena symbol operations for efficient code navigation:
- Find definitions:
serena_find_symbol instead of text search
- Understand structure:
serena_get_symbols_overview for file organization
- Track references:
serena_find_referencing_symbols for impact analysis
- Precise edits:
serena_replace_symbol_body for clean modifications
When to use Serena vs traditional tools:
- Use Serena: Navigation, refactoring, dependency analysis, precise edits
- Use Read/Grep: Reading full files, pattern matching, simple text operations
- Fallback: If Serena unavailable, traditional tools work fine
Example workflow:
# Instead of:
Read: src/Services/OrderService.cs
Grep: "public void ProcessOrder"
# Use:
serena_find_symbol: "OrderService/ProcessOrder"
serena_get_symbols_overview: "src/Services/OrderService.cs"
1---2name: dotnet-version-detection3category: developer-experience4subcategory: project5description: Detects TFM/SDK from .csproj, global.json, Directory.Build.props. Runs first.6license: MIT7targets: ['*']8tags: [csharp, dotnet, skill]9version: '0.0.1'10author: 'dotnet-agent-harness'11invocable: true12claudecode:13 allowed-tools: ['Read', 'Grep', 'Glob', 'Bash', 'Write', 'Edit']14 model: haiku15copilot: {}16codexcli:17 short-description: '.NET skill guidance for csharp tasks'18geminicli: {}19opencode:20 allowed-tools: ['Read', 'Grep', 'Glob', 'Bash', 'Write', 'Edit']21antigravity: {}22---2324````! dotnet --version 2>/dev/null252627```bash2829# dotnet-version-detection3031Detects .NET version information from project files and provides version-specific guidance. This skill runs **first** before any .NET development work. All other skills depend on the detected version to adapt their guidance.3233Cross-cutting skill referenced by [skill:dotnet-advisor] and virtually all specialist skills. See also [skill:dotnet-file-based-apps] for .NET 10+ file-based apps that run without a `.csproj`.3435## Scope3637- Reading TFM from .csproj, Directory.Build.props, and global.json38- Multi-targeting detection and highest-TFM selection39- SDK version detection and preview feature gating40- Version-specific API availability guidance41- C# language version mapping and support lifecycle reporting4243## Out of scope4445- Project structure analysis beyond TFM -- see [skill:dotnet-project-analysis]46- .NET 10 file-based apps without .csproj -- see [skill:dotnet-file-based-apps]47- Framework upgrade migration steps -- see [skill:dotnet-version-upgrade]48- Multi-targeting polyfills and conditional compilation -- see [skill:dotnet-multi-targeting]4950---5152## Fast Repository Scan (Optional)5354For large repos, run the bundled scanner first to quickly inventory TFM/SDK signals before applying the precedence algorithm below:5556```bash5758python3 skills/dotnet-version-detection/scripts/scan-dotnet-targets.py --root . --json5960```bash6162Use the script output (`project_target_frameworks`, `global_json.sdk_version`, `workflow_dotnet_versions`) as discovery input. The precedence rules below remain authoritative for final TFM selection.6364---6566## Detection Precedence Algorithm6768Read project files in this strict order. **Higher-numbered sources are lower priority.** Stop falling through once a TFM is resolved.6970### 1. Direct `<TargetFramework>` in .csproj (highest priority)7172Read the nearest `.csproj` file to the current working file/directory.7374```xml7576<PropertyGroup>77 <TargetFramework>net10.0</TargetFramework>78</PropertyGroup>7980```xml8182If found **and the value is a literal TFM** (e.g., `net10.0`, not `$(SomeProperty)`), this is the authoritative TFM. Report it and proceed to additional detection (Step 5).8384If the value is an MSBuild property expression (starts with `$(`), skip to **Step 4** for unresolved property handling.8586### 2. `<TargetFrameworks>` in .csproj (multi-targeting)8788```xml8990<PropertyGroup>91 <TargetFrameworks>net8.0;net10.0</TargetFrameworks>92</PropertyGroup>9394```xml9596If found:97- Report **all** TFMs (semicolon-delimited)98- Guide based on the **highest** TFM (e.g., net10.0)99- Note polyfill needs for lower TFMs: "Consider [skill:dotnet-multi-targeting] for PolySharp/Polyfill to backport language features to net8.0"100- Proceed to additional detection (Step 5)101102### 3. `Directory.Build.props` shared TFM103104If no `<TargetFramework>` or `<TargetFrameworks>` found in the .csproj (or if the .csproj inherits from shared props), read `Directory.Build.props` in the current directory or any parent directory up to the solution root.105106```xml107108<!-- Directory.Build.props -->109<PropertyGroup>110 <TargetFramework>net10.0</TargetFramework>111</PropertyGroup>112113```xml114115If found, use this as the TFM. Note: per-project `.csproj` values override `Directory.Build.props`.116117### 4. MSBuild Property Expressions (fallback with warning)118119If the TFM value is an MSBuild property expression rather than a literal:120121```xml122123<TargetFramework>$(MyCustomTfm)</TargetFramework>124125```xml126127Emit warning:128> **Warning: Unresolved MSBuild property `$(MyCustomTfm)`.** Cannot determine TFM statically. Falling back to SDK version from `global.json`.129130Then fall through to `global.json` SDK version (Step 4a) or `dotnet --version` (Step 4b).131132#### 4a. `global.json` SDK version133134```json135136{137 "sdk": {138 "version": "10.0.100"139 }140}141142```text143144Map SDK version to approximate TFM:145- `8.0.xxx` -> net8.0146- `9.0.xxx` -> net9.0147- `10.0.xxx` -> net10.0148- `11.0.xxx-preview.x` -> net11.0149150Report: "Inferred TFM from `global.json` SDK version. Verify actual TFM in project file."151152#### 4b. `dotnet --version` (last resort)153154If no `global.json` exists, use `dotnet --version` output to infer SDK version. Same mapping as 4a.155156Report: "Inferred TFM from installed SDK version. No `global.json` or `.csproj` found. Consider creating a project with `dotnet new`."157158---159160## Additional Detection (Step 5)161162After resolving the TFM, also check these files for supplementary version information. Always perform these checks regardless of which precedence step resolved the TFM.163164### 5a. `global.json` SDK Version165166Even if TFM was resolved from .csproj, read `global.json` for:167- `sdk.version` -- the pinned SDK version168- `sdk.rollForward` -- the rollForward policy (e.g., `latestFeature`, `latestPatch`)169170Report the SDK version alongside the TFM. Flag inconsistencies:171> **Warning: TFM `net10.0` but `global.json` pins SDK `9.0.100`.** The project targets a newer framework than the pinned SDK. Update `global.json` or verify the build environment has the correct SDK.172173### 5b. C# Language Version174175Check for explicit `<LangVersion>` in .csproj or `Directory.Build.props`:176177```xml178179<LangVersion>preview</LangVersion>180181```csharp182183- If `preview` -- report "C# preview features enabled. Unlocks the next C# version available in the installed SDK (e.g., C# 15 preview features with a .NET 11 preview SDK)."184- If `latest` -- report the default C# version for the detected TFM185- If explicit version (e.g., `12.0`) -- report that version, warn if it's below the TFM default186- If absent -- use the default C# version for the TFM (see reference data below)187188### 5c. Preview Feature Detection189190Check for these properties in .csproj or `Directory.Build.props`:191192**EnablePreviewFeatures:**193194```xml195196<EnablePreviewFeatures>true</EnablePreviewFeatures>197198```xml199200Report: ".NET preview features enabled. Access to preview APIs and types."201202**Runtime-async feature flag (.NET 11+):**203204```xml205206<Features>$(Features);runtime-async=on</Features>207208```xml209210Report: "Runtime-async enabled. Async/await uses runtime-level execution instead of compiler state machines."211212Note: runtime-async requires `<EnablePreviewFeatures>true</EnablePreviewFeatures>` as well.213214### 5d. Multi-targeting Details215216If multi-targeting was detected (Step 2), also note:217- Which TFMs are LTS vs STS vs Preview218- Which TFMs are approaching end-of-support219- Suggest [skill:dotnet-multi-targeting] for polyfill guidance220221---222223## Structured Output Format224225After detection, present results in this structured format:226227```text228229.NET Version Detection Results230==============================231TFM: net10.0 (or net8.0;net10.0 for multi-targeting)232Highest TFM: net10.0233C# Version: 14 (default for net10.0)234SDK Version: 10.0.100 (from global.json)235Preview Features: none236Runtime-Async: not enabled237Warnings: none238239Guidance: This project targets .NET 10 LTS with C# 14. Use modern patterns240including field-backed properties, collection expressions, and primary241constructors. All guidance will target net10.0 capabilities.242243```csharp244245For multi-targeting:246247```text248249.NET Version Detection Results250==============================251TFMs: net8.0;net10.0252Highest TFM: net10.0253C# Version: 14 (default for highest TFM)254SDK Version: 10.0.100 (from global.json)255Preview Features: none256Warnings: net8.0 reaches end of support Nov 2026257258Guidance: Multi-targeting net8.0 and net10.0. Guide on net10.0 patterns.259For net8.0 compatibility, use PolySharp/Polyfill for language features.260See [skill:dotnet-multi-targeting] for detailed polyfill guidance.261262```text263264---265266## Edge Cases267268### No .csproj Found269If no `.csproj` exists in the workspace:270- Check for `.sln` or `.slnx` files and look for referenced projects271- If no project files found, continue the fallback chain:272 1. Read `global.json` for SDK version (Step 4a) and infer TFM from it273 2. If no `global.json`, use `dotnet --version` (Step 4b) to infer TFM274 3. Only if both inference methods fail: "No .NET project or SDK detected. Defaulting guidance to net10.0 (current LTS). Use `dotnet new` to create a project."275276### MSBuild Property Indirection277If `<TargetFramework>` contains `$(PropertyName)`:278- Emit: "**Unresolved property: `$(PropertyName)`.** Cannot determine TFM from static analysis."279- Fall back to `global.json` SDK version, then `dotnet --version`280- Recommend verifying TFM via `dotnet --list-sdks` or `dotnet msbuild -getProperty:TargetFramework`281282### Inconsistent Files283If .csproj says `net10.0` but `global.json` pins SDK `9.0.100`:284- Prefer the .csproj TFM (higher precedence)285- Warn about the mismatch286- Suggest updating `global.json` to match287288### No SDK Installed289If `dotnet --version` fails or is not found:290- Report: "No .NET SDK detected on this system. Install from https://dot.net"291- If project files exist, still report the TFM from project files292- Note that builds will fail without the SDK293294### `.fsproj` and `.vbproj`295The same detection logic applies to F# (`.fsproj`) and VB.NET (`.vbproj`) projects. The `<TargetFramework>` element is identical across all .NET project types.296297---298299## Caching Behavior300301Version detection results should be cached per-project (per .csproj path). Re-detect when:302- The user switches to a different project within the solution303- The user explicitly asks to re-detect304- A `.csproj`, `Directory.Build.props`, or `global.json` file is modified305306---307308## Version-to-Feature Reference Data309310> **Last updated: 2026-02-11**311312This reference data maps .NET versions to their C# language versions, key features, and support lifecycle. This section is **separate from the detection logic above** -- detection determines which version is in use; this data maps that version to available features.313314### Version Matrix315316| .NET Version | Status | C# Version | TFM | Support End | Notes |317|-------------|--------|-------------|-----|-------------|-------|318| .NET 8 | LTS (active) | C# 12 | net8.0 | Nov 2026 | Approaching end of support |319| .NET 9 | STS | C# 13 | net9.0 | May 2026 | Approaching end of support |320| .NET 10 | LTS (current) | C# 14 | net10.0 | Nov 2028 | Recommended for new projects |321| .NET 11 | Preview 1 | C# 15 (preview) | net11.0 | TBD (expected STS end: ~May 2028 if Nov 2026 GA) | Preview only -- not for production |322323### C# Version Feature Highlights324325**C# 12 (net8.0)**326- Primary constructors for classes/structs327- Collection expressions (`[1, 2, 3]`)328- `ref readonly` parameters329- Default lambda parameters330- Alias any type with `using`331- Inline arrays332- Interceptors (experimental)333334**C# 13 (net9.0)**335- `params` collections (any collection type)336- `Lock` type (`System.Threading.Lock`)337- New escape sequence `\e`338- Method group natural type improvements339- Implicit indexer access in object initializers340- `ref` and `unsafe` in iterators/async341- Partial properties342343**C# 14 (net10.0)**344- Field-backed properties (`field` contextual keyword)345- `nameof` for unbound generic types346- Extension improvements (extension blocks)347- First-class `Span<T>` in more contexts348- `allows ref struct` anti-constraint for generics349350**C# 15 preview (net11.0)**351- Collection expression arguments (`with()` syntax for capacity/comparers):352353 ```csharp354355 List<int> nums = [with(capacity: 32), 0, ..evens, ..odds];356 HashSet<string> names = [with(comparer: StringComparer.OrdinalIgnoreCase), "Alice"];357358````359360- Additional features expected as .NET 11 progresses through preview361362### .NET 11 Preview 1 Notable Features363364These features are available when `net11.0` TFM is detected with preview features enabled:365366- **Runtime-async**: Async/await at runtime level (requires `<EnablePreviewFeatures>true</EnablePreviewFeatures>` +367 `<Features>$(Features);runtime-async=on</Features>`)368- **Zstandard compression**: `System.IO.Compression.Zstandard` (2-7x faster than Brotli/Deflate)369- **BFloat16**: `System.Numerics.BFloat16` for AI/ML workloads370- **Happy Eyeballs**: `ConnectAlgorithm.Parallel` for dual-stack networking371- **CoreCLR for Android**: Default runtime for MAUI Android Release builds372- **XAML source generation**: Default in MAUI (replaces XAMLC)373- **EF Core**: Complex types + JSON columns with TPT/TPC inheritance374- **CoreCLR on WASM**: Experimental alternative to Mono for Blazor WASM375376### Support Lifecycle Guidance377378When reporting version information, include lifecycle context:379380- **End-of-support approaching** (within 6 months): Warn and suggest [skill:dotnet-version-upgrade]381- **Preview/RC**: Warn "not for production use" unless user explicitly opted in382- **STS reaching end**: Note shorter support window compared to LTS383- **Current LTS**: Confirm as recommended target for new projects384385## Code Navigation (Serena MCP)386387**Primary approach:** Use Serena symbol operations for efficient code navigation:3883891. **Find definitions**: `serena_find_symbol` instead of text search3902. **Understand structure**: `serena_get_symbols_overview` for file organization3913. **Track references**: `serena_find_referencing_symbols` for impact analysis3924. **Precise edits**: `serena_replace_symbol_body` for clean modifications393394**When to use Serena vs traditional tools:**395396- **Use Serena**: Navigation, refactoring, dependency analysis, precise edits397- **Use Read/Grep**: Reading full files, pattern matching, simple text operations398- **Fallback**: If Serena unavailable, traditional tools work fine399400**Example workflow:**401402```text403# Instead of:404Read: src/Services/OrderService.cs405Grep: "public void ProcessOrder"406407# Use:408serena_find_symbol: "OrderService/ProcessOrder"409serena_get_symbols_overview: "src/Services/OrderService.cs"410```