TeamCity NUnit runner fails because of x86 - x64 - MSIL discrepancies -
i have solution bunch of projects, of have test projects. these compiled any cpu
platform.
in teamcity, have build configuration nunit 2.6.4, on specify platform: auto (msil)
, version: 4.0
.
when run build, tests fail following message:
nunit error running tests in 'c:\buildagent\work\a58fc6cd9bf63032\jsonapi.tests\obj\release\jsonapi.tests.dll' assembly loading assembly compiled v4.0.30319, msil nunit runner runtime v4.0.30319, x64
even stranger, when switched off "run failed tests first" (and changed nothing else), instead got following:
nunit error running tests in 'c:\buildagent\work\a58fc6cd9bf63032\jsonapi.owin.tests\obj\release\jsonapi.owin.tests.dll' assembly loading assembly compiled v4.0.30319, msil nunit runner runtime v4.0.30319, x86
note in 1 case, runner x86, while in other it's x64. in neither case, load assembly compiled msil.
i assume off build settings here, what?
based on more detailed log provided, real cause of build failure appears be:
... system.io.filenotfoundexception: not load file or assembly 'system.web.http, version=5.2.3.0, culture=neutral, publickeytoken=31bf3856ad364e35 or 1 of dependencies. system cannot find file specified. file name: 'system.web.http, version=5.2.3.0, culture=neutral, publickeytoken=31bf3856ad364e35|' server stack trace: @ system.reflection.runtimeassembly.getexportedtypes(runtimeassembly assembly, objecthandleonstack rettypes) @ system.reflection.runtimeassembly.getexportedtypes() @ nunit.core.coreextensions.installadhocextensions(assembly assembly) @ nunit.core.builders.testassemblybuilder.load(string path) @ nunit.core.builders.testassemblybuilder.build(string assemblyname, boolean autosuites) @ nunit.core.builders.testassemblybuilder.build(string assemblyname, string testname, boolean autosuites) @ nunit.core.testsuitebuilder.build(testpackage package) @ nunit.core.simpletestrunner.load(testpackage package) @ nunit.core.proxytestrunner.load(testpackage package) @ nunit.core.proxytestrunner.load(testpackage package) @ nunit.core.remotetestrunner.load(testpackage package) @ system.runtime.remoting.messaging.stackbuildersink._privateprocessmessage(intptr md, object|[|] args, object server, object|[|]& outargs) @ system.runtime.remoting.messaging.stackbuildersink.syncprocessmessage(imessage msg) ...
and believe happening because of reason mentioned in so thread have linked in comments, i.e. running tests obj folder while should bin. still guess, because not providing nunit step configuration.
to address issue should explicit paths assemblies unit tests located. this:
**\bin\**\*.tests.dll
under "list assembly files:". way assemblies obj folders not tested, see this thread.
Comments
Post a Comment