You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Essentially, either using "Test" in a project name or just referencing nunit is enough to make bits of the build system think your project is a test project. And when it isn't really a test project, the VS Test Explorer throws up.
You have to explicitly annotate projects as not being test projects. And apparently you have to do that in three different ways:
Set the IsTestProject build property to false
Set the TestProject build property to false
Remove the TestContainerProjectCapability that nUnit apparently adds.
Apparently the VS Test team aren't planning to improve Test Explorer's handling of this at all. The official solution is that it's our job to understand why this really confusing error occurs and apply these changes to our project files microsoft/vstest#4469 (comment)
The text was updated successfully, but these errors were encountered:
It's unclear in this thread if this issue is fixed. I am on Visual Studio 2022 17.9.5 and I'm referencing 17.9 of the Test.Sdk and I still run into this issue. Yes, I am using NUnit for test projects. I even tried using the "workaround" by specifying false for IsTestProject and TestProject and the ProjectCapability remove option (all three) for non-Test projects, and I still run into the issue.
This is very frustrating. Running tests in Test Explorer targeting net48 works just fine. It's only net6 targeted projects that have difficulty.
If this issue is fixed, what release is expected to have it available?
This seems to be the same problem described in microsoft/vstest#4469
Essentially, either using "Test" in a project name or just referencing nunit is enough to make bits of the build system think your project is a test project. And when it isn't really a test project, the VS Test Explorer throws up.
You have to explicitly annotate projects as not being test projects. And apparently you have to do that in three different ways:
IsTestProject
build property tofalse
TestProject
build property tofalse
TestContainer
ProjectCapability
that nUnit apparently adds.See microsoft/vstest#4469 (comment)
Apparently the VS Test team aren't planning to improve Test Explorer's handling of this at all. The official solution is that it's our job to understand why this really confusing error occurs and apply these changes to our project files microsoft/vstest#4469 (comment)
The text was updated successfully, but these errors were encountered: