Reputation: 3761
I have enabled "Package Restore", into our builds, to which we have a nightly build to ensure everything builds correctly.
We are getting package errors on our build machine, but not on our local machines.
The error is:
nuget.targets (43): Unable to find version (2.5.1) Castle.Core
I would assume the version are package are irrelevant, but I've added for context.
Any thoughts?
Package Config:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Castle.Core" version="2.5.2" />
<package id="FluentNHibernate" version="1.2.0.712" />
<package id="Iesi.Collections" version="3.1.0.4000" />
<package id="NHibernate" version="3.1.0.4000" />
<package id="NHibernate.Castle" version="3.1.0.4000" />
</packages>
Upvotes: 1
Views: 2485
Reputation: 11598
Set the build log to output at a diagnostic level. This should show the error during the nuget portion of the build.
The switch is:
/verbosity:diag
You didn't say what you are using to initiate the CI, so I assume you know how to modify the invocation.
You can also try to run the nuget.targets file manually via msbuild from the command line. From the project folder try:
msbuild myproj.csproj /target:RestorePackages /v:diag
or
msbuild myproj.csproj /target:BuildPackages /v:diag
Upvotes: 1
Reputation: 9248
Make sure all the package sources you need for restoring are set and not disabled on the ci machine.
To list/add them :
nuget.exe sources <List|Add|Remove|Enable|Disable|Update> -Name [name] -Source [source]
This could also be a proxy issue, but it's less likely since support has been added in recent nuget.exe and it would ask for credentials.
Upvotes: 0