Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSBuild <IsTestProject> is ignored #1970

Open
laurentpayot opened this issue Dec 12, 2023 · 0 comments
Open

MSBuild <IsTestProject> is ignored #1970

laurentpayot opened this issue Dec 12, 2023 · 0 comments

Comments

@laurentpayot
Copy link

laurentpayot commented Dec 12, 2023

Describe the bug

The MSBuild project property group element <IsTestProject> (for instance set to true when creating a test project with xUnit) seems ignored by Ionide. So having <IsTestProject>false</IsTestProject> does not remove the project from the test explorer and a Ionide warning about missing tests pops up when there are not tests in the projects.

The predicate ProjectExt.isTestProject checks if "Microsoft.TestPlatform.TestHost" or "Microsoft.NET.Test.Sdk" are in the project’s package references. But in the example repository mentioned below, a single set of paket packages is shared between projects.
Would it be possible to check something related to IsTestProject that would be higher priority?

Steps to reproduce

Add <IsTestProject>false</IsTestProject> in a project property group of a MSBuild project file and the project will still appear in the test explorer.

Link to sample reproduction

In the https://github.com/laurentpayot/fsharp-fable-elmish-example repository, the app.fsproj project file has <IsTestProject>false</IsTestProject> but it appears in the list of test projects and a Ionide warning about missing tests pops up.

Expected behaviour

Having <IsTestProject>false</IsTestProject> should remove the project from the test explorer projects and we should see no Ionide warning about missing tests in that project.

Machine info

  • OS: Linux Ubuntu 23.10
  • .NET SDK version: 8.0.100
  • Ionide version: 7.16.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant