dotnet-version-detection

Detect TFM and .NET SDK version from .csproj, Directory.Build.props, and global.json.

1|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/rudironsoni/dotnet-agent-harness --skill dotnet-version-detection-rudironsoni
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-version-detection
Source: https://github.com/rudironsoni/dotnet-agent-harness/tree/main/.rulesync/skills/dotnet-version-detection
Command: npx skills add https://github.com/rudironsoni/dotnet-agent-harness --skill dotnet-version-detection-rudironsoni

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill automatically detects the target framework moniker (TFM) and .NET SDK version used by your project, ensuring compatibility and guiding you towards the correct .NET development practices.

Core Features & Use Cases

  • TFM Detection: Reads .csproj, Directory.Build.props, and global.json to determine the project's target framework.
  • SDK Versioning: Identifies the installed .NET SDK version and its relation to the TFM.
  • Multi-Targeting Support: Handles projects targeting multiple frameworks, prioritizing the highest TFM.
  • Use Case: Before writing any code, this skill runs to confirm your project targets .NET 10 LTS with C# 14, allowing subsequent skills to provide accurate, version-specific guidance.

Quick Start

Run the dotnet-version-detection skill to determine 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 TFM and SDK version from my project files?

Detect the .NET TFM and SDK version by parsing .csproj, Directory.Build.props, and global.json files. This skill infers versions when direct TFM declarations are absent and provides guidance based on detected C# language version and feature availability.

What is a Target Framework Moniker and how does multi-targeting detection work?

A Target Framework Moniker (TFM) defines the .NET runtime your project targets. For multi-targeting projects, this skill reads multiple framework declarations and prioritizes the highest TFM to ensure accurate version-specific guidance.

Can I infer the .NET SDK version if my .csproj lacks a direct TFM declaration?

Yes, you can infer the .NET SDK version when direct TFM declarations are absent. The skill examines project configuration files like Directory.Build.props and global.json to determine the target framework and SDK relation.

Does this tool support multi-targeting frameworks in Directory.Build.props?

Yes, this tool supports multi-targeting frameworks in Directory.Build.props. It handles projects targeting multiple frameworks by prioritizing the highest TFM, allowing subsequent operations to provide accurate version-specific guidance.

Why check the C# language version before writing new project code?

Checking the C# language version before writing code ensures compatibility and guides you towards correct .NET development practices. The skill confirms your project targets specific versions, enabling accurate version-specific feature availability checks.