0

I am trying to build an run unit tests using Teamcity build server. I got my project to build, and also installed NUnit. But when I try to run the unit tests I get the following error.

Starting: D:\Ntapps\TeamCity\BuildAgent2\work\5abc171d155702d0\packages\NUnit.ConsoleRunner.3.6.0\tools\nunit3-console.exe D:\Ntapps\TeamCity\BuildAgent2\temp\buildTmp\dppSJMLyACKKGB7l1dAWbvFo9bLR6TcR.nunit --result=D:\Ntapps\TeamCity\BuildAgent2\temp\buildTmp\dppSJMLyACKKGB7l1dAWbvFo9bLR6TcR.nunit.xml --noheader
in directory: D:\Ntapps\TeamCity\BuildAgent2\work\5abc171d155702d0\AMDV\AMDV.App.IntegrationTests\bin\Debug
Runtime Environment
OS Version: Microsoft Windows NT 6.3.9600.0
CLR Version: 4.0.30319.42000

Test Files
D:\Ntapps\TeamCity\BuildAgent2\temp\buildTmp\dppSJMLyACKKGB7l1dAWbvFo9bLR6TcR.nunit

System.ArgumentException: Version string portion was too short or too long.
    at System.Version.VersionResult.SetFailure(ParseFailureKind failure, String argument)
    at System.Version.TryParseVersion(String version, VersionResult& result)
    at System.Version.Parse(String input)
    at System.Version..ctor(String version)
    at NUnit.Engine.Services.RuntimeFrameworkService.ApplyImageData(TestPackage package)
    at NUnit.Engine.Services.RuntimeFrameworkService.ApplyImageData(TestPackage package)
    at NUnit.Engine.Services.RuntimeFrameworkService.ApplyImageData(TestPackage package)
    at NUnit.Engine.Services.RuntimeFrameworkService.SelectRuntimeFramework(TestPackage package)
    at NUnit.Engine.Runners.MasterTestRunner.InitializePackage()
    at NUnit.Engine.TestEngine.GetRunner(TestPackage package)
    at NUnit.ConsoleRunner.ConsoleRunner.RunTests(TestPackage package, TestFilter filter)
    at NUnit.ConsoleRunner.Program.Main(String[] args)
Process exited with code -100
Publishing artifacts
Process exited with code -100
Step NUnit failed

I tried googling this but that doesn't help, and I don't know where to look.

I followed this tutorial to setup.

5
  • This is a bug in NUnit-Console, but likely triggered by something strange that TC is passing into NUnit. Could you retrieve the file dppSJMLyACKKGB7l1dAWbvFo9bLR6TcR.nunit following the instructions from this link - and add it to your question? confluence.jetbrains.com/display/TCD10/…
    – Chris
    Oct 6, 2017 at 9:33
  • You also need to specify the version of NUnit (both framework and runner) you are using. Saying that it's the one provided by TC means that nobody associated with NUnit can actually answer you, because we don't know what that version is - and it may depend on the TC version as well.
    – Charlie
    Oct 6, 2017 at 18:30
  • @Charlie I have the following version: - On teamcity: NUnit.Console version 3.6.0 - In the project: Nunit version 3.8.1 Do I still need to install something else maybe?
    – kevingoos
    Oct 9, 2017 at 7:56
  • 1
    What runtime is targeted by your test assembly?
    – Charlie
    Oct 10, 2017 at 16:41
  • I found the problem, it was inside my tests
    – kevingoos
    Oct 11, 2017 at 9:51

1 Answer 1

0

I found the problem. I was not using NUnit inside my tests but mstest instead. A durp on my side :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.