When a .nunit project file is passed to NUnit 3.2.1, I get the following error:
Test Files
D:\buildAgent-1\temp\buildTmp\SDfHu2hL4FX7foQDHXGCHHeJAqo0QsAK.nunit
Errors and Failures
1) Invalid : D:\buildAgent-1\temp\buildTmp\SDfHu2hL4FX7foQDHXGCHHeJAqo0QsAK.nunit
File type is not supported
Passing the DLL works, but this problem breaks the NUnit plugin for TeamCity.
The .nunit file looks like this:
<NUnitProject>
<Settings activeconfig="active" appbase="D:\buildAgent-1\work\a7777f86cc8169d9"/>
<Config name="active">
<assembly path="RestSharp.Portable.OAuth2.Tests\bin\Release\RestSharp.Portable.OAuth2.Tests.dll"/>
</Config>
</NUnitProject>
The console runner was called with the following command:
D:\buildAgent-1\work\a7777f86cc8169d9\packages\NUnit.ConsoleRunner.3.2.1\tools\nunit3-console.exe D:\buildAgent-1\temp\buildTmp\SDfHu2hL4FX7foQDHXGCHHeJAqo0QsAK.nunit --work=D:\buildAgent-1\work\a7777f86cc8169d9 --noresult --noheader --framework=net-4.0.
Replacing the .nunit file with the .dll works as expected.
It seems that someone else had this problem too on StackOverflow.
Which nuget package are you using to get NUnit.ConsoleRunner?
Running project files is packaged as an extension to the main console runner. If you use NUnit.Runners, the extension will be included with the engine automatically. (The core NUnit.ConsoleRunner doesn't include the project running extension.)
Alternatively, you could also install the Project Loader Extension as a separate package.
OK, that is the problem. Thank you for the help!
Most helpful comment
Which nuget package are you using to get NUnit.ConsoleRunner?
Running project files is packaged as an extension to the main console runner. If you use NUnit.Runners, the extension will be included with the engine automatically. (The core NUnit.ConsoleRunner doesn't include the project running extension.)
Alternatively, you could also install the Project Loader Extension as a separate package.