Just another Blog

My Technical, Professional and at times Personal Blog

Showing posts with label NuGet Package Manager. Show all posts

How to upgrade Visual Studio 2010 Library Package Manager

I ran into the below issue while trying to install EFCodeFirst package while building MVC Music Store using the Tutorial using Visual Studio 2010

Error Message - The package contains PowerShell scripts and needs to be installed from the package manager console.











Here is how I resolved it.

I opened the package manager console and ran the below commands.






PM> get-package -remote -filter EFCodeFirst

output:
Id                            Version                       Description                
--                            -------                       -----------                
DynamicData.EFCodeFirstPro... 0.1.0.0                       Supports using Dynamic Dat...
DynamicData.EFCodeFirstPro... 0.1.0.1                       Supports using Dynamic Dat...
DynamicData.EFCodeFirstPro... 0.1.0.2                       Supports using Dynamic Dat...
EFCodeFirst                   0.8                           CTP5 of the Code First Pro...
EFCodeFirst                   1.0                           Legacy package, Code First...
EFCodeFirst                   1.1                           Legacy package, Code First...
EFCodeFirst.CreateTablesOnly  1.0.0                         Adds a IDatabaseInitialize...
EFCodeFirst.CreateTablesOnly  1.0.1                         Adds a IDatabaseInitialize...
EFCodeFirst.CreateTablesOnly  1.0.2                         Adds a IDatabaseInitialize...
EFCodeFirst.Sample            0.8                           This sample blog model dem...
EFCodeFirst.SqlServerCompact  0.8.8482                      Allows SQL Server Compact ...
EFCodeFirst.SqlServerCompact  0.8.8482.1                    Allows SQL Server Compact ...
FSRepository                  0.4                           FSRepository provides a qu...
FSRepository                  0.5.0.0                       FSRepository provides a qu...

PM> install-package -id EFCodeFirst
output:
'EntityFramework (≥ 4.1.10331.0)' not installed. Attempting to retrieve dependency from source...
Done
You are downloading EntityFramework from Microsoft, the license agreement to which is available at http://go.microsoft.com/fwlink/?LinkID=211010. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'EntityFramework 4.1.10331.0'
Successfully installed 'EFCodeFirst 1.1'
Successfully added 'EntityFramework 4.1.10331.0' to MvcMusicstore
Successfully added 'EFCodeFirst 1.1' to MvcMusicstore

---------------------------------------------
       EFCodeFirst PACKAGE IS OBSOLETE  
---------------------------------------------

A supported go-live version of Code First is now available as part of the 'EntityFramework' package.
The 'EntityFramework' package has been installed to your project.
Please install 'EntityFramework' directly in the future.


Later, I found Scott Hanselman's blog where he shows how you can update the NuGet package manager. I believe the NuGet upgrade would have saved me the error message in first place.

http://www.hanselman.com/blog/NuGetActionPlanUpgradeTo11SetupAutomaticUpdatesGetNuGetPackageExplorer.aspx

Upgrade NuGet using Extension Manager










The package explorer lets you explore and gives you additional information on the package which is really nice.

Google+ Followers