teamcity - I have unit tests that pass in NUnit GUI and Resharper, but fail when Team City runs them -


i have teamcity server set build multiple solutions , run unit tests in them using nunit test runner.

this has been working several months; however, our latest build encountering following error:

setup method failed. setup : system.io.fileloadexception : not load file or assembly 'log4net, version=1.2.13.0, culture=neutral, publickeytoken=669e0ddf0bb1aa2a' or 1 of dependencies. located assembly's manifest definition not match assembly reference. (exception hresult: 0x80131040)

it happens single testfixture contains 9 tests out of hundreds in entire system. tests pass when run using resharper or nunit gui.

the nuget package correctly referenced in both project being tested , test project itself. there no runtime assembly binding redirects necessary 1 version of log4net has ever been installed.

has else had similar issue have solved or ideas issue might possibly be? why work locally , not on server, given same tests passed previously.

the versions of nunit on both local machine , teamcity server same.

i'll answer own question in case else encounters this.

the issue seems log4net's assembly manifest has been packaged incorrectly, or @ least differently how 1 might expect.

this arises dll version being 1.2.13, nuget package version being 2.0.3.

what did add assembly binding following, fixed issue:

<dependentassembly>     <assemblyidentity name="log4net" publickeytoken="669e0ddf0bb1aa2a" culture="neutral" />     <bindingredirect oldversion="0.0.0.0-1.2.13.0" newversion="2.0.3" /> </dependentassembly> 

i have absolutely no idea why failed 1 project out of ~60 being built or why worked within dev environment vs/resharper nunit test runner, failed teamcity!


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -