Noobie frustrated by nuGet

by Admin 22. January 2012 20:44

So I am fairly new to MVC 3 but I did want to use the latest version of jQuery.  To my disappointment the default MVC 3 project comes with jQuery version 1.5.1.  Now, for my first MVC3 Razor project I just updated all of the script files manually.  That was quite annoying, then I found my savior (so to speak) nuGet.  NuGet should allow me to update the jQuery files via a simple simple Package Manager Console command "update-package jquery".  It can't be this simple...

Well guess what it isn't, again I was only given half the story.  So blissfully ignorant I proceeded to run the command:

PM> update-package jquery
Successfully installed 'jQuery 1.7.1'.
Update-Package : Conflict occurred. 'jQuery 1.5.1' referenced but requested 'jQuery 1.7.1'. 'jQuery.vsdoc 1.5.1, jQuery.Validation 1.8.0, jQu
ery.UI.Combined 1.8.11' depend on 'jQuery 1.5.1'.
At line:1 char:15
+ update-package <<<< jquery
+ CategoryInfo : NotSpecified: (:) [Update-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.UpdatePackageCommand

 

Huh, success but failure.  So in my research I found the following command:

PM> get-package

Id Version Description
EntityFramework 4.1.10331.0 DbContext API and Code First workflow for ADO.NET Entity Framework.
jQuery 1.5.1 jQuery is a new kind of JavaScript Library....
jQuery 1.7.1 jQuery is a new kind of JavaScript Library....
jQuery.UI.Combined 1.8.11 jQuery UI is an open source library of interface components — interactions, full-featu...
jQuery.Validation 1.8.0 This jQuery plugin makes simple clientside form validation trivial, while offering lot...
jQuery.vsdoc 1.5.1 Includes vsdoc files for jQuery 1.5.1 that provide IntelliSense in Visual Studio 2010....
Modernizr 1.7 Modernizr adds classes to the <html> element which allow you to target specific browse...

Ok lets think about this, incompatable errors, a bunch of different pacakages of course .  After some trial and error I came up with the following order in which to run the updates:

update-package jQuery.UI.Combined
update-package jQuery.Validation
update-package Moderniz
update-package jQuery.vsdoc
update-package jQuery

This order allows jquery to update via nuGet correctly.  I hope this helps other frustrated nuGet noobs.

Tags: , , ,

jquery | MVC3 | nuGet | Razor

blog comments powered by Disqus

Calendar

<<  October 2017  >>
MoTuWeThFrSaSu
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345

View posts in large calendar

Page List

RecentComments

None