10

When I attempt to Install-Package Twitter.Bootstrap in an empty mvc4 web project I get this

Install-Package Twitter.Bootstrap
Attempting to resolve dependency 'bootstrap (≥ 3.0.1)'.
Attempting to resolve dependency 'jquery (≥ 1.9.0)'.
Install-Package : External packages cannot depend on packages that target projects.
At line:1 char:1
+ Install-Package Twitter.Bootstrap
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

What can I do to fix this ?

11 Answers 11

21

I had the same problem, this work for me:

Install-Package Bootstrap

"As of v3.0.1.1 the Twitter.Boostrap package will begin redirecting users to the Bootstrap package managed by the Outercurve foundation. The reason for this move is pretty simple. Bootstrap is a cleaner namespace since the project dropped the twitter name a few releases ago and Bootstrap now officially ships with the Visual Studio 2013 ASP.Net templates. So to avoid confusion on which release is "official", we've agreed to redirect everyone over to the new Microsoft maintained namespace."

http://chriskirby.net/bootstrap-nuget-package-moving-to-outercurve/

https://github.com/sirkirby/twitter-bootstrap-nuget/issues/22

12

I encountered the same error with both VS 2010 and VS 2012. The suggested solution did not solve the problem, but I did notice that the NuGet Package for Bootstrap is dated Nov 1, 2013 (yesterday). The new package has version number 3.0.1.1 and it lists a dependency of Bootstrap version 3.0.1 or higher. It appears there is an error in version 3.0.1.1 of this package with a circular reference in the dependency. Look for version 3.0.1 by the same authors.

5

I am assuming you are using Visual Studio 2012. In VS2012 new MVC4 projects are loaded with jquery 1.7 by default. But Bootstrap 3.0.1 has a dependency on jquery 1.9 or higher

So first run

update-package jQuery

and then

install-package twitter.bootstrap
2
  • 1
    how do you run that in vs2012? Commented Nov 14, 2013 at 14:51
  • @NickTurner Package Manager Console
    – TMan
    Commented Nov 23, 2013 at 20:14
5

I had the same problem. After I updated NuGet Manager, it solved by problem. To update NuGet Manager, you can to Tools -> Extensions and Updates

0
2

I had the same problem when installing Bootstrap 3.0.1.1. It does look like it is looking for 3.0.1 for its dependency. I at the end installed 3.0.0 with no problem.

2
  • I think it was having a problem with the jQuery 2 that I had installed
    – Peter
    Commented Nov 3, 2013 at 8:16
  • 1
    @Peter That may not be the case as I just installed it with jquery 2 and twitter.bootstrap version 3.0.1 Its just not working with 3.0.1.1 because of it dependency.
    – Dushyant
    Commented Nov 5, 2013 at 11:17
1

I had this same problem that brought me to this question. In Package Manager I searched for bootstrap and there were several results returned.

I clicked on the on at the top of the list and tried to install this one (version 3.0.1.1) and received the error reported in the original question. The ID of this package is Id: Twitter.Bootstrap

There was another Bootstrap package listed with version 3.0.2 with Id: bootstrap

I installed the second one v. 3.0.2 and this installed without any issues.

Taken from fontawesome: "The folks at Outercurve have taken over support for the Twitter.Bootstrap package now being called simply bootstrap. More info here http://chriskirby.net/bootstrap-nuget-package-moving-to-outercurve/"

It would seem to me that the redirect to the new Microsoft maintained namespace is causing this to happen.

1

My Problem perfectly solved

Try

Install-Package Bootstrap

Instead of

Install-Package Twitter.Bootstrap

refered post:

Bootstrap v3.0.1.1 fails on clean VS empty project - how to resolve?$privUrl

how to launch Package Manager console

http://docs.nuget.org/docs/start-here/using-the-package-manager-console

0
0

just try installing Twitter bootstrap MVC with NuGet Package Manager and enjoy

1
  • This doesn't really help me with the problem
    – Peter
    Commented Nov 4, 2013 at 0:58
0

Just try update vs2012 !I resolved it!

0

I updated VS2012 to VS2013. It resolved the problem

0

I also had the same issue. But resolved when updated the Nuget Manager and tried again after that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.