.NET test projects are recognised only via an explicit Microsoft.NET.Test.Sdk reference: xunit.v3 + Microsoft.Testing.Platform and Arcade SDK projects have "no tests"

オープン 初心者向け
#253 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
csharp
領域
tooling

調査の方向性

検出ロジックは project_validator/ecosystems/dotnet/tools.py の _test_project です(75〜81行目付近)。現在は Microsoft.NET.Test.Sdk への参照または MSTest.Sdk のSdk属性を必要としています。issueの再現手順と合わせて確認してください。xunit.v3 または UseMicrosoftTestingPlatformRunner を含み、[Fact] メソッドを持つ .csproj です。そのようなプロジェクトがテストプロジェクトとして認識され、xunit.v3、NUnit、MSTest のパッケージ参照をテストがカバーすれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Humanizer (161 files with [Fact], xunit.v3 on Microsoft.Testing.Platform) and dotnet/command-line-api (53 files, Arcade SDK where the test SDK is implicit) get FAIL "no tests found ([Fact], [Test] or [TestMethod] methods in a test project (one referencing Microsoft.NET.Test.Sdk))". A project with [Fact]/[Test] methods and an xunit/NUnit/MSTest package reference is a test project.

Evidence from the corpus audit

Humanizr/Humanizer, dotnet/command-line-api / tests-run
  • kind: FALSE_NEGATIVE
  • actual: FAIL: .NET: no tests found ([Fact], [Test] or [TestMethod] methods in a test project (one referencing Microsoft.NET.Test.Sdk)) (both projects)
  • expected: tests found: Humanizer has 161 files with [Fact] in an xunit.v3 / Microsoft.Testing.Platform project; command-line-api has 53 in Arcade SDK projects, where the test SDK is implicit.
  • evidence: Humanizer tests/Humanizer.Tests/Humanizer.Tests.csproj:6-7: <TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport> / <UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>; :19: <PackageReference Include="xunit.v3.mtp-v2" />. command-line-api Directory.Build.props:3: <Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />; src/System.CommandLine.Tests/System.CommandLine.Tests.csproj:1: <Project Sdk="Microsoft.NET.Sdk"> with no test-SDK reference. Validator: project_validator/ecosystems/dotnet/tools.py:75-81 _test_project requires PackageReference == "Microsoft.NET.Test.Sdk" or Sdk starting with MSTest.Sdk.
  • repro: a .csproj with <PackageReference Include="xunit.v3" /> (or UseMicrosoftTestingPlatformRunner) and a .cs with [Fact].
  • confidence: high

Found by the regression-corpus audit (235 real repositories, one or more per ecosystem profile; corpus and expected results in corpus/). Evidence is quoted from the audited checkouts at the commits pinned in corpus/projects.toml; <checkouts>/<owner>__<repo> is such a checkout.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ByTXNqDWdM7HzezrFtEvQt

主要言語
Python
スター
4
フォーク
1
平均マージ
10時間 41分
マージ済み PR(30日)
79

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cpp-best-practices/project_validator のほかの issue

cpp-best-practices/project_validator の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。