Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why am I getting "File type is not supported" on TeamCity 9 when using NUnit 3?

I'm using TeamCity Enterprise 9.1.5 (build 37377).

I have created a Build Configuration.

I have created an NUnit Build Step.

For NUnit Runner I selected NUnit 3.

For Path to NUnit Console Runner I entered: packages\NUnit.ConsoleRunner.3.7.0\tools\nunit3-console.exe

In my Visual Studio solution I have installed the NUnit.Runner package.

When I run the Build Configuration I get the following error in the logs: File type is not supported

How do I get my NUnit tests to run in TeamCity?

like image 982
Jesus is Lord Avatar asked Dec 04 '17 14:12

Jesus is Lord


1 Answers

What worked for me:

I uninstalled NUnit.Runner and installed the following packages:

  • NUnit.ConsoleRunner
  • NUnit.Extension.NUnitProjectLoader
  • NUnit.Extension.TeamCityEventListener (not sure if this is needed, or not)

Why is the error being generated?

The ConsoleRunner can't handle .nunit files. That ability is part of NUnit.Extension.NUnitProjectLoader. The directory that extension is in will need to be listed as part of the .addins file. (I can't find the GitHub links where I found that information.)

How I troubleshooted:

TeamCity generated an .nunit file. I copied that file from the agent to my development machine to troubleshoot and run nunit3-console.exe myself. Once it ran on my development machine, TeamCity worked, too.

like image 154
Jesus is Lord Avatar answered Oct 21 '22 00:10

Jesus is Lord