c# - Different version of a nuget package is being installed and referenced during build to the project references and packages -


on our build server have solution projects reference version 3.6 of rabbit client tools nuget package. when build solution on build server seems downloading version 4.0.2 of rabbit client tools. though there no reference dll either in code, or easynetq library i'm using alongside far can tell.

i've tried:

  • clearing nuget cache on server
  • cleaning checkout directories
  • changing rabbit client nuget version
  • checked assembly binding versions in app.config.

all correct before build occurs.

as aside, don't know if make difference, assembly redirects in app , web configs apps being switched 4, though local code 3.6.5.

also, seem build fine through visual studio 2015 i'm assuming must can left behind on server somewhere nuget.

packages.config:

<packages>   <package id="easynetq" version="0.62.1.445" targetframework="net452" />   <package id="easynetq.management.client" version="0.51.1.105" targetframework="net452" />   <package id="guerrillantp" version="1.0.0.0" targetframework="net452" />   <package id="log4net" version="2.0.3" targetframework="net452" />   <package id="microsoft.aspnet.webapi.client" version="5.2.3" targetframework="net452" />   <package id="microsoft.aspnet.webapi.core" version="5.2.3" targetframework="net452" />   <package id="microsoft.aspnet.webapi.owin" version="5.2.3" targetframework="net452" />   <package id="microsoft.aspnet.webapi.owinselfhost" version="5.2.3" targetframework="net452" />   <package id="microsoft.owin" version="3.0.1" targetframework="net452" />   <package id="microsoft.owin.diagnostics" version="3.0.1" targetframework="net452" />   <package id="microsoft.owin.host.httplistener" version="3.0.1" targetframework="net452" />   <package id="microsoft.owin.hosting" version="3.0.1" targetframework="net452" />   <package id="microsoft.owin.selfhost" version="3.0.1" targetframework="net452" />   <package id="mongocsharpdriver" version="2.2.3" targetframework="net452" />   <package id="mongodb.bson" version="2.2.3" targetframework="net452" />   <package id="mongodb.driver" version="2.2.3" targetframework="net452" />   <package id="mongodb.driver.core" version="2.2.3" targetframework="net452" />   <package id="newtonsoft.json" version="9.0.1" targetframework="net452" />   <package id="octopack" version="3.0.45" targetframework="net452" developmentdependency="true" />   <package id="owin" version="1.0" targetframework="net452" />   <package id="rabbitmq.client" version="3.6.5" targetframework="net452" />   <package id="swashbuckle.core" version="5.4.0" targetframework="net452" />   <package id="topshelf" version="3.1.2" targetframework="net452" /> </packages> 

try running "manual nuget restore" on build server....just see if working correctly. temporarily push different "packages" directory. i've used "mypackages" here.

nuget.exe restore .\packages.config -packagesdirectory .\mypackages 

you can command line nuget.exe here:

https://dist.nuget.org/index.html

the key here be:

which subfolders getting?

".\mypackages\rabbitmq.client.4.0.2"

and/or

".\mypackages\rabbitmq.client.3.6.5"

if "manual nuget restore" working correctly (which in case getting subfolder ".\mypackages\rabbitmq.client.3.6.5"), there outside of normal nuget workflow happening during build.

op answer edit line of investigation didn't solve issue did point else changing packages file whilst build running. ended being teamcity having auto update feature in nuget package restore, wasn't being logged.


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -