dotnet-version-detection

Detect .NET Target Framework Monikers and SDK versions from project files.

71|10|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-version-detection-wshaddix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-version-detection
Source: https://github.com/wshaddix/dotnet-skills/tree/main/skills/dotnet-version-detection
Command: npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-version-detection-wshaddix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automatically determines the .NET Target Framework Moniker (TFM) and SDK version used by your project, ensuring that subsequent development guidance is accurate and relevant.

Core Features & Use Cases

  • Automatic TFM Detection: Identifies the TFM from .csproj, Directory.Build.props, or global.json files.
  • SDK Version Pinning: Detects the exact .NET SDK version being used.
  • Use Case: Before starting any .NET development, run this skill to confirm you're targeting the correct framework (e.g., .NET 8, .NET 10) and using the appropriate SDK, preventing compatibility issues.

Quick Start

Run the dotnet-version-detection skill to identify the TFM and SDK version for the current project.

Frequently Asked Questions about dotnet-version-detection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect the .NET Target Framework Moniker (TFM) used in my project?

To detect the .NET TFM, analyze project files like .csproj, Directory.Build.props, and global.json. This Skill automatically identifies the exact target framework your project is using, resolving MSBuild property indirection to ensure accurate framework detection.

What is the best way to check my .NET SDK version before starting development?

The best way to check your .NET SDK version is by parsing global.json and project files. This Skill detects the pinned SDK version to confirm you are using the appropriate SDK, preventing compatibility issues before you begin development.

Can I detect .NET versions for projects with missing project files?

Yes, you can detect .NET versions with missing project files. This Skill handles edge cases such as absent .csproj files and MSBuild property indirection, providing accurate TFM and SDK version detection even when standard configuration files are missing.

Does this handle multi-targeting and C# language versions in .NET?

Yes, it handles multi-targeting and C# language versions. After detecting the TFM and SDK version from your project files, the Skill provides specific guidance on multi-targeting frameworks, C# language versions, and available preview features.

Why does my .NET version detection fail with MSBuild property indirection?

.NET version detection often fails with MSBuild property indirection because framework versions are dynamically resolved. This Skill successfully parses .csproj and Directory.Build.props files by resolving these properties to accurately identify the target framework.