Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NuGet error "External packages cannot depend on packages that target projects" when installing SNAP 1.4

Tags:

nuget

I get the following error when trying to install SNAP 1.4 into a fresh VS2010-project using Nuget 1.3:
"External packages cannot depend on packages that target projects"

Is this a problem with the SNAP Nuget package, or am I doing anything wrong?

PM> Install-Package SNAP 'Castle.Core (≥ 2.5.2)' not installed. Attempting to retrieve dependency from source... Done.
Install-Package : External packages cannot depend on packages that target projects.
At line:1 char:16
+ Install-Package <<<< SNAP
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId :
NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

like image 296
Jonas Avatar asked May 09 '11 09:05

Jonas


1 Answers

Reading this issue here:

http://nuget.codeplex.com/workitem/595

It sounds like it happens if a project that doesn't have any Content relies on one that does. Not sure whether this always fails, or just when there isn't a "current project". I do remember seeing a "Default Project" dropdown in the Package Manager Console, so not really sure why this wouldn't work.

Can you try installing it through the UI? (right-click the references folder of the project, then do Add Library Package (or similar)). Also check you have a project selected in the Solution Explorer and/or the Default Package in the console window.

like image 68
Danny Tuppeny Avatar answered Oct 08 '22 11:10

Danny Tuppeny