0
votes

In my solution there are several projects, some are using NUnit 2 and some are using NUnit 3.

They have the relevant test adapters and versions installed via NuGet.

When my TFS build runs, I get the error:

Error: Exception NUnit.Core.UnsupportedFrameworkException, Exception thrown executing tests in E:\BuildAgents\Agent1_work\9\s\Kittens_Local\Kitten\kitten\kitten\Kitten.Fluffy.Tests\bin\Debug\Kitten.Fluffy.Tests.dll

This project is using version 3 while the other tests are using version 2.

Is it possible to get both working simultaneously in TFS?

1

1 Answers

1
votes

This seems to be a issue in Nunit2 adapter(Nunit TestAdapter Nuget Package). So you could not get both working simultaneously in TFS. More details please refer Charlie's answer in this question: nunit tests throwing exception only when run as part of tfs msbuild process

If you have both adapters installed, each one will run the tests for which they are designed. Each of them will display a message in for any assembly that they do not support. The message isn't meant to be an error and we try to word it in such a way that it won't be taken as such. However, we felt we have to give it just in case you expected the assembly to be handled by that particular adapter. Passing it by silently seems wrong.

When running under the VS IDE, the message does not cause a failure in the test run. It appears that running under TFS does cause a failure. If memory serves, we fixed this problem for the NUnit 3 adapter but not (yet) for the NUnit 2 adapter.