The output directory for each project needs to have the target attribute.cs file generated.
Setting GenerateTargetFrameworkAttribute to false in the Directory.Build.props would result in this C# source file not generated. Previously, the below marked file was not generated.
This would have adverse effect when targeting the right version.
Earlier xUnit.net was targetting .NET 4.0
And with the change it targets or points to the correct version .NET 6.0.
Thus, the tests are discovered correctly solving this issue.
Problem
When run locally, unittests are non-discoverable.
Solution
The output directory for each project needs to have the target attribute.cs file generated. Setting
GenerateTargetFrameworkAttribute
to false in the Directory.Build.props would result in this C# source file not generated. Previously, the below marked file was not generated.This would have adverse effect when targeting the right version.
Thus, the tests are discovered correctly solving this issue.
Checklist