platform-detection
यह क्या करती है
यह स्किल पता लगाती है कि .NET प्रोजेक्ट कौन-सा टेस्ट प्लेटफ़ॉर्म और टेस्ट फ़्रेमवर्क इस्तेमाल करता है, और उसकी सेटिंग्स आपस में मेल खाती हैं या नहीं। यह उन डेवलपर्स के लिए है जिन्हें टेस्ट बदलने या चलाने से पहले यह जानना है कि वे असल में कैसे चलते हैं।
कब इस्तेमाल करें
- ✓जब आप पूछते हैं कि कोई .NET प्रोजेक्ट कौन-सा टेस्ट प्लेटफ़ॉर्म या फ़्रेमवर्क इस्तेमाल करता है।
- ✓जब आपको जानना है कि प्रोजेक्ट VSTest इस्तेमाल करता है या Microsoft.Testing.Platform।
- ✓जब टेस्ट सेटिंग्स आपस में टकराती लगती हैं और आपको पता करना है कि असल में टेस्ट कौन चलाता है।
Skill का लिंक
https://github.com/dotnet/skills/blob/main/plugins/dotnet-test/skills/platform-detection/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या मेरा .NET सॉल्यूशन अपने टेस्ट VSTest से चलाता है या Microsoft.Testing.Platform से, और कौन-सा टेस्ट फ़्रेमवर्क इस्तेमाल होता है?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट ग्लोबल सेटिंग्स, प्रोजेक्ट फ़ाइलें और पैकेज रेफ़रेंस जाँचता है, फिर बताता है कि असल में कौन-सा प्लेटफ़ॉर्म और फ़्रेमवर्क टेस्ट चलाता है, और उसके सबूत भी दिखाता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Test Platform and Framework Detection
Determine which test platform (VSTest or Microsoft.Testing.Platform) and which test framework (MSTest, xUnit, NUnit, TUnit) a project uses.
Response contract
Honor the user's requested labels and order exactly, substituting the actual
classification for every placeholder. Start with the verdict: never put a
heading, scratch analysis, tool syntax, or an echoed template before it. Follow
with one concise evidence sentence naming the repository facts needed to justify
every requested classification. When Framework is requested, name the package
or project SDK that identifies it. Use a second sentence only for a conflict, an
incomplete configuration, or target-framework-specific differences.
Platform means the platform that actually executes tests: VSTest or
MTP. If conflicting or incomplete configuration prevents execution, report
it as unavailable rather than inventing a successful platform.
Never classify the executed platform from global.json test.runner alone.
That setting selects dotnet test command mode; even an explicit VSTest
value can bridge to an executable MTP application. Continue through the project
runner, bridge, and output-shape signals before writing Platform:.
Apply this scope gate before drafting the evidence:
| User asks for | Evidence to include | Omit |
|---|---|---|
| Platform and framework | Final runner selector and its winning source; package or project SDK identifying the framework; when needed, the property that makes it executable | Command mode; common SDK facts; OutputType unless it is missing or conflicting |
| The single deciding signal | That runner-selection property, why its source wins, and why a competing package does not select or imply VSTest; still name the package or project SDK identifying a requested framework | Bridge, OutputType, SDK mode, and unrelated prerequisites when the configuration is complete |
| Platforms per target framework | Only the conditional final values that differ by target | Common properties and project-wide SDK commentary |
| Explicit opt-out | Final UseVSTest value and its winning source |
Superseded defaults unless they create a conflict |
dotnet test mode |
The separate command-mode and executed-platform classifications | None of the requested axes |
If the requested labels omit dotnet test mode, do not state or explain command
mode anywhere in the response. An exact bridge property may still be decisive
platform evidence, but do not turn it into SDK or CLI-mode commentary.
When the user asks which single signal decides between an explicit runner
property and Microsoft.NET.Test.Sdk, the evidence sentence must say both that
the runner property selects MTP and that Microsoft.NET.Test.Sdk does not
select or imply VSTest.
When import precedence decides a property, state why the winning source wins (for example, it is imported later or its condition applies), not merely that it contains the final value or overrides another assignment.
Keep the explanation on the requested axis:
- An SDK version pin in
global.jsonis context, not a platform selector. Claim thatglobal.jsonselects VSTest or native MTP only when itstest.runnersetting actually does so. - If
UseVSTest=trueis decisive, say that directly. Do not speculate about an absenttest.runneror describe SDK pinning as an additional platform choice. - If command mode was not requested, do not add it, even when it was needed internally to determine the executed platform.
When a classic-project request also asks for the command family, add a direct
line such as Command family: MSBuild + vstest.console.exe; do not turn it into
an optional alternative or add an unnecessary build qualifier.
For a file-backed request, enumerate the following configuration names once,
then read every relevant file that is present in one batched operation:
global.json, .csproj, packages.config, Directory.Build.props,
Directory.Build.targets, Directory.Packages.props, and explicit imported
.props / .targets. A setting absent from the project file may be defined by
an import, so never infer its final value from the .csproj alone. Do not search
the web or inspect unrelated files when repository configuration is sufficient.
Resolve properties in the actual MSBuild import order, not with a fixed "project beats props" rule. For every applicable target framework
अक्सर पूछे जाने वाले सवाल
क्या केवल ग्लोबल सेटिंग्स से प्लेटफ़ॉर्म पता चल सकता है?
नहीं। कोई सेटिंग कमांड मोड चुन सकती है, पर असल प्लेटफ़ॉर्म तय नहीं करती। इसलिए स्किल दूसरे संकेत भी जाँचती है।
अगर कॉन्फ़िगरेशन अधूरी हो तो?
स्किल बताती है कि प्लेटफ़ॉर्म तय नहीं हो सकता, और अंदाज़ा नहीं लगाती।
क्या यह गैर-.NET प्रोजेक्ट पर भी काम करती है?
नहीं। यह केवल .NET प्रोजेक्ट और उनकी टेस्ट सेटिंग्स के लिए है।
जानकारी
लेखक का मूल विवरण
Identify a .NET project's test platform, framework, command mode, and SDK-style vs classic project system. Use only for "which test platform/framework?", "VSTest or MTP?", or "what runner does this project use?", including bridge settings, UseVSTest opt-outs, and incompatible or conflicting VSTest/MTP configuration. Resolves global.json, project, packages.config, Directory.Build.props, and Directory.Packages.props precedence for MSTest/xUnit/NUnit/TUnit. DO NOT USE when the user asks to run/filter tests or for commands, flags, TRX/dumps, or test-command/filter errors; use run-tests directly. D
repo: dotnet/skills
लोकप्रियता
- GitHub स्टार
- 5.8k
- रैंकिंग में स्थान
- #14634
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
create-custom-agent
5.8kयह आपके एजेंट को VS Code के custom agent फ़ाइलें बनाने देती है, जिनके अपने tools, निर्देश और दूसरे agents को handoffs होते हैं।
create-skill
5.8kयह आपके एजेंट को सही नाम, साफ़ trigger विवरण और मानक के अनुसार SKILL.md फ़ाइल वाली नई agent skill बनाने में मदद करती है।
csharp-scripts
5.8kयह आपके एजेंट को .NET command line टूल से एक छोटा C# प्रोग्राम एकल फ़ाइल के रूप में चलाने देती है, पूरा प्रोजेक्ट बनाए बिना।
dotnet-pinvoke
5.8kयह आपके एजेंट को .NET से native C या C++ libraries सही तरीके से कॉल करने में मदद करती है, जिसमें signatures, string संभालना, memory और सुरक्षित handles शामिल हैं।
मिलती-जुलती skills
test-driven-development
311kयह आपके एजेंट को किसी भी फ़ीचर या सुधार से पहले पहले असफल होने वाला टेस्ट लिखना, उसे असफल होते देखना, फिर पास करने वाला सबसे छोटा कोड लिखना सिखाती है।
verification-before-completion
311kयह आपके एजेंट को किसी काम, सुधार या build के पूरा या पास होने का दावा करने से पहले असली जांच चलाकर उसका आउटपुट पढ़ना सिखाती है।
migrate-to-shoehorn
310kआपकी टेस्ट फ़ाइलों में जोखिम भरे type casts की जगह shoehorn लाइब्रेरी लगाती है, ताकि टेस्ट अधूरे डेटा से भी type checks पास कर सकें।