Nuget package dependencies. Does it work the way it should? - nuget

RavenDb latest version is installed as a nuget package. It references Newtonsoft.Json 4.0.2.
I'm trying to install TweetSharp. I get this log:
M> Install-Package TweetSharp
Attempting to resolve dependency 'Hammock (≥ 1.2.3)'.
Attempting to resolve dependency 'Newtonsoft.Json (≥ 4.0.1)'.
Successfully installed 'Hammock 1.2.6'.
Successfully installed 'Newtonsoft.Json 4.0.3'.
Successfully installed 'TweetSharp 2.0.8'.
Install failed. Rolling back...
Install-Package : Updating 'Newtonsoft.Json 4.0.2' to 'Newtonsoft.Json 4.0.3'
failed. Unable to find a version of 'RavenDB-Embedded' that is compatible with
'Newtonsoft.Json 4.0.3'.
As you can see, even if TweetSharp just needs 'Newtonsoft.Json (≥ 4.0.1)', nuget wants to install version 4.0.3 which can not work with RavenDb.
I tried to install previous versions of TweetSharp but it does not change anything.
Any way to circumvent this?

Sounds like a possible bug in NuGet. Please log an issue in the NuGet bug tracker: http://nuget.codeplex.com/workitem/list/basic
If TweetSharp is fine with NewtonSoft.Json 4.0.2, then the install should not have failed. In your bug, can you post the exact versions that caused this problem. For example:
List of installed packages with exact version installed.
List of dependencies for each package and the specific version range they specify.
And the exact version of TweetSharp you're trying to install. That'll help us look at the issue more quickly. Thanks!
My guess is we have some default logic that tries to upgrade packages to the latest bug fix release. In this case, we tried that, but it causes another dependency to fail. In that case, we should have known that and not tried to upgrade.

This is down to the semantic versioning that NuGet has had since (I think) 1.6. It's explained in more detail here but the basic idea is that if your dependency hasn't updated either the major or the minor revision number then they'll assume that it's a bugfix and not a breaking change.
So in this case the decision to install 4.0.3 instead of 4.0.1 was made.
You can run install-package with -ignoredependencies I would have thought that if you'd had 4.0.2 installed it wouldn't try to update you (because 4.0.2 satisfies the dependency).

Related

Chaquopy upgrade pip

While running the latest chaquopy I am running into the error:
Collecting tensorflow==1.13.1
Could not find a version that satisfies the requirement tensorflow==1.13.1 (from versions: 1.10.1)
No matching distribution found for tensorflow==1.13.1
I am wondering if the internal chaquopy pip is too old and needs to be upgraded. How is this possible?
The issue isn't the version of pip, it's the version of TensorFlow. Try changing your project to use version 1.10.1 instead, as the message suggests.

Error When Installing NuGet Packages

When I try to install EF with NuGet in Visual Studio 2013 Pro, I get this error:
Attempting to resolve dependency 'EntityFramework.Commands (≥ 7.0.0-beta4)'.
'EntityFramework.Commands' already has a dependency defined for 'EntityFramework.Relational'.
When I try to install EntityFramework.Core I get this erro:
Attempting to resolve dependency 'Ix-Async (≥ 1.2.3)'.
'EntityFramework.Core' already has a dependency defined for 'Ix-Async'.
What could possibly be the problem, I've seen others with the issue, they suggested installing an upgraded NuGet, which I did. The problem persists. No other solutions have worked.
Any one have any ideas how I can fix this? It's a VSTO addin for Outlook 2013.
Thanks
EDIT:
After restarting VS2013 after updating NuGet I tried to install EF again, got a new error:
Attempting to resolve dependency 'EntityFramework.Commands (≥ 7.0.0-beta4)'.
Installing 'EntityFramework.Commands 7.0.0-beta4'.
Successfully installed 'EntityFramework.Commands 7.0.0-beta4'.
Executing script file 'C:\Users\shenk\Documents\Visual Studio 2013\Projects\Archiver\packages\EntityFramework.Commands.7.0.0-beta4\tools\init.ps1'.
Installing 'EntityFramework 7.0.0-beta4'.
Successfully installed 'EntityFramework 7.0.0-beta4'.
Adding 'EntityFramework.Commands 7.0.0-beta4' to Archiver.
Uninstalling 'EntityFramework.Commands 7.0.0-beta4'.
Successfully uninstalled 'EntityFramework.Commands 7.0.0-beta4'.
Install failed. Rolling back...
Could not install package 'EntityFramework.Commands 7.0.0-beta4'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
However when I try to install EntityFramework.Core again, it succeeds now.
I want to use EF6, but cannot find it on NuGet, and when I try to install it with the Microsoft Download Center, it never downloads.
I'm a bit lost here so any help would be appreciated.
Upgrade NuGet to the latest version from here:
https://nuget.codeplex.com/releases/view/612846
Update:
NuGet at codeplex has been moved to https://github.com/nuget/home
Simply download latest version from:
https://www.nuget.org/downloads
The solution I found was to use IE to download things from Microsoft Download center. I was able to install EF tools for VS2012 and VS2013.
Next to install EF6 I went to Tools -> NuGet Package Manager -> Package Manager Console. In the console I entered Install-Package EntityFramework You can also do Install-Package EntityFramework -pre to get the latest release (7.0.0-beta4)
This worked for me. Unless someone else has a better solution I will accept this one in a day or so.

GLIBC_2.7 not found

I am getting the following error when trying to run several executables:
/lib/libc.so.6: version `GLIBC_2.7' not found (required by .tools/bridge/bridge)
I have recently upgraded from CentOS 5.3 to 5.7 (I am required to run these tools on CentOS 5, so I can't upgrade to 6).
I recompiled the whole code but this error still appears.
Has anyone encountered this type of error?
Thanks,
Claudiu
The error means that you built .tools/bridge/bridge on a system with glibc-2.7 (or later), and are trying to run it on a system that has glibc-2.6 or earlier.
Linux (and most UNIXes) does not support "build on later, run on earlier"; only the reverse scenario is supported.
See also this answer.
The 'glibc' is not the latest version, and you can try to update glibc package.
yum install glibc
or
yum install glibc-2.7

How can I keep nuget from updating dependencies?

I'm attempting to install a nuget package which has incorrectly specified one of it's dependencies. Common.Logging.Log4Net requires log4net = 1.2.10 however the nuget package specifies log4net >= 1.2.10. Even if I manually install the older version of log4net, nuget upgrades log4net to 1.2.11 when I install Common.Logging.Log4Net. How can I get nuget to bypass dependency resolution or at least prefer installed packages of a sufficient version?
In order to bypass dependency resolution you can use the -IgnoreDependencies option:
Install-Package -IgnoreDependencies ThePackageName
You should be able to lock the package to a specific version by hand-editing the packages.config and setting the allowedVersions attribute to indicate the version span you want to allow.
<package id="Common.Logging.Log4Net" version="1.2.10"
allowedVersions="[1.2,1.2.10]" />
Note that his will however not upgrade the version of the package at all even when explicitly updating the package.
See the nuget versioning documentation for more info on versioning.

Installing Eclipse with ant1.8 on Ubuntu 10.04 through package manager

I'm having trouble figuring out a way to have both Eclipse and ant1.8 installed through the package manager on Ubuntu 10.04.
With ant1.8 installed, trying to install eclipse yields:
The following packages have unmet dependencies:
eclipse: Depends: eclipse-jdt but it is not going to be installed
Depends: eclipse-pde but it is not going to be installed
E: Broken packages
Going down the dependency tree, I arrive at:
The following packages have unmet dependencies:
eclipse-platform: Depends: ant (>= 1.7.1)
E: Broken packages
But, installing ant requires the removal of ant1.8.
Is there a way to resolve this issue without installing ant1.8 or or eclipse outside of the package manager?
Thanks!
Do you have any reason to keep ant 1.8? If not, remove it first and then try the same again after you install ant 1.7.1.
I personally never install any java development tools from repository, because it gives you all kind of problems, such as version incompatibility, difficulties to upgrade etc. Most of the java tools, IDEs, app servers are available for download in zip archives, so you just have to unzip it, set up environment variables and you're ready to go!