通過Package Manager Console 向VS2010安裝 EntityFramework

通過Package Manager Console 向VS2010安裝 EntityFramework

嘗試用VS2010--工具--Library Package Manager--Add Library Package Reference的online搜索 EntityFramework,

再找到的結果中,點選該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 entityframework

Id                                      Version                                Description                           
--                                      -------                                -----------                           
BinbinMemberShipEntityFrameworkCodeF... 1.0.0.0                                membership entityframework codefirst  
BinbinMemberShipEntityFrameworkCodeF... 1.0.0.1                                2011-08-15:添加類...                     
Check_My_Box_Packages                   1.1.0.2                                This Package uses MvcScaffolding, E...
Check_My_Box_Packages                   1.1.0.3                                This Package uses MvcScaffolding, E...
EFCodeFirst                             1.0                                    Legacy package, Code First is now i...
EFCodeFirst                             1.1                                    Legacy package, Code First is now i...
EntityFramework                         4.1.10311.0                            DbContext API and Code First workfl...
EntityFramework                         4.1.10331.0                            DbContext API and Code First workfl...
EntityFramework                         4.1.10715.0                            DbContext API and Code First workfl...
EntityFramework.Extensions              0.0.1                                  A couple useful extensions for crea...
EntityFramework.Extensions              0.0.2                                  A couple useful extensions for crea...
EntityFramework.Patterns                0.2                                    Provides different patterns to be u...
EntityFramework.Patterns                0.5                                    EntityFramework.Patterns provides d...
EntityFramework.Preview                 4.2.0.0                                Entity Framework 4.2 Beta 1. DbCont...
EntityFramework.Sample                  4.1                                    This sample blog model demonstrates...
EntityFramework.SqlMigrations           0.5.10727.0                            Preview of Code First Migrations fo...
EntityFramework.SqlServerCompact        4.1.8482.1                             Allows SQL Server Compact 4.0 to be...
EntityFramework.SqlServerCompact        4.1.8482.2                             Allows SQL Server Compact 4.0 to be...
EntityFrameworkProfiler                 1.0.0.912                              EntityFramework Profiler is a real-...
FSRepository                            1.0.0.0                                FSRepository provides a quick way o...
FSRepository                            2.0.0.0                                FSRepository provides a quick way o...
ImtModelsStarter                        0.5.6                                  .Net models starter project that se...
ImtModelsStarter                        0.5.7                                  .Net models starter project that se...
ImtModelsStarter                        0.5.8                                  .Net models starter project that se...
ImtModelsStarter                        0.5.9                                  .Net models starter project that se...
NCommon.EntityFramework                 1.2                                    NCommon data adapter for Entity Fra...
NContext.Persistence.EntityFramework    1.0                                    Entity Framework 4.1 support for NC...
NContext.Persistence.EntityFramework    1.1                                    Entity Framework 4.1 support for NC...
netfx-Patterns.DomainContext.EF         1.0.0.0                                Implements the Domain Context patte...
RIAServices.EntityFramework             4.1.60629.0                            WCF RIA Services EntityFramework 4....
RIAServices.EntityFramework             4.1.60730.0                            WCF RIA Services Toolkit- WCF RIA S...
RiaServices.EntityFramework.Scaffolding 0.1                                    Scaffolds a WCF RIA DbDomainService...
RIAServices.Toolkit.All                 4.1.60730.0                            WCF RIA Services Toolkit - All NuGe...
RIAServices.Toolkit.All                 4.1.60730.1                            WCF RIA Services Toolkit - All NuGe...
RiaServicesContrib.EntityFramework.S... 0.2                                    Scaffolds a WCF RIA DbDomainService...
Unity.Mvc3.EntityFramework.Quickstart   0.5                                    Quickstart sample for using Unity a...
Unity.Mvc3.EntityFramework.Quickstart   0.6                                    Legacy package. Please use this pac...
Unity.Mvc3.EntityFramework.Quickstart   0.7                                    Legacy package. Please use this pac...


PM> install-package -id EntityFramework -Version 4.1.10311.0
You are downloading EntityFramework from Microsoft, the license agreement to which is available at http://go.microsoft.com/fwlink/?LinkID=211009. 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.
已成功安裝“EntityFramework 4.1.10311.0”
已成功將“EntityFramework 4.1.10311.0”添加到 MvcMovie

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章