I am in the process of migrating projects from .NET Framework to .NET Core. We have several hundred of them with lots of unit tests that are executed by the NUnit console runner. Recently, we discovered that the .NET Framework version of the NUnit console runner tries to execute the .NET Core tests as well and fails at this task. The test .dlls are built to the same output folder for DevOps purposes.
As a workaround we started to specifically exclude the projects that we already migrated to .NET Core and run them separately with dotnet test.
This is fine with a couple of projects but it is going to get very messy very soon so I am looking for a way to solve this.
I know there is a way to exclude certain categories and we could mark the TestFixtures in the migrated projects with some category but I would like to know if there is a better way around this.
Is it possible to Configure NUnit test runner to check for the target framework and exclude .NET Core projects?
dotnet test?