通过Package Manager Console 向VS2010安装 EFCodeFirst

尝试用VS2010--工具--Library Package Manager--Add Library Package Reference的online搜索 EFCodeFirst,
再找到的结果中,点选该Package的Install,
却提示错误:
"This package (or one of its dependencies) contains powershell scripts and needs to be installed from the package manager console."
 
根据提示改用Package Manager Console来安装,
打开VS2010--工具--Library Package Manager--Package Manager Console,

 

PM > get-package -remote -filter EFCodeFirst 
Id                                                            Version                                                       Description                                                 
--                                                            -------                                                       -----------                                                 
DynamicData.EFCodeFirstProvider                               0.1.0.0                                                       Supports using Dynamic Data with EF Code First models       
DynamicData.EFCodeFirstProvider                               0.1.0.1                                                       Supports using Dynamic Data with EF Code First models       
DynamicData.EFCodeFirstProvider                               0.1.0.2                                                       Supports using Dynamic Data with EF Code First models       
DynamicData.EFCodeFirstProvider                               0.2                                                           Supports using Dynamic Data with EF Code First models       
EFCodeFirst                                                   0.8                                                           CTP5 of the Code First Programming Model and Productivity...
EFCodeFirst                                                   1.0                                                           Legacy package, Code First is now included in the 'Entity...
EFCodeFirst                                                   1.1                                                           Legacy package, Code First is now included in the 'Entity...
EFCodeFirst                                                   1.1.0.1                                                       Legacy package, Code First is now included in the 'Entity...
EFCodeFirst.CreateTablesOnly                                  1.0.0                                                         Adds a IDatabaseInitializer implementation for EF Code Fi...
EFCodeFirst.CreateTablesOnly                                  1.0.1                                                         Adds a IDatabaseInitializer implementation for EF Code Fi...
EFCodeFirst.CreateTablesOnly                                  1.0.2                                                         Adds a IDatabaseInitializer implementation for EF Code Fi...
EFCodeFirst.Sample                                            0.8                                                           This sample blog model demonstrates the use of the Entity...
EFCodeFirst.SqlServerCompact                                  0.8.8482                                                      Allows SQL Server Compact 4.0 to be used with Entity Fram...
EFCodeFirst.SqlServerCompact                                  0.8.8482.1                                                    Allows SQL Server Compact 4.0 to be used with Entity Fram...
FsEfCodeFirst.Linq                                            0.1.0.0                                                       FsEfCodeFirst.Linq provides a quick way to create EFCodeF...
FSRepository                                                  0.4                                                           FSRepository provides a quick way of creating a repositor...
FSRepository                                                  0.5.0.0                                                       FSRepository provides a quick way of creating a repositor...

 
PM > install-package -id EFCodeFirst

已成功安装“EFCodeFirst 1.1.0.1
已成功将“EFCodeFirst 1.1.0.1”添加到 ...


 

posted @ 2012-03-07 14:14  IT爱好者  阅读(2862)  评论(0编辑  收藏  举报