使用NuGet安裝EntityFramework4.2


使用NuGet安裝EntityFrameWork4.2

1、下載NuGet

有兩種方式下載NuGet

第一種:在微軟的檔案庫下載,下載地址為:http://visualstudiogallery.msdn.microsoft.com/27077b70-9dad-4c64-adcf-c7cf6bc9970c?SRC=VSIDE

弟二種:在vs2010的Tools中Extension Manager-》OnlineGallery 中搜索NuGet並下載安裝

2、安裝NuGet

在安裝NuGet時,遇到了一個錯誤

Error: The Package Manager Console requires PowerShell 2.0 runtime, which is not detected on this machine.
Please install the PowerShell 2.0 from http://support.microsoft.com/kb/968929 and restart Visual Studio.

解決方案:卸載PowerShell 1.0

卸載后,能正確的安裝成功

3、安裝EntityFramework4.2

在 Package Manager Console 中 運行Install-Package EntityFramework

遇到錯誤

Install-Package : The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
At line:1 char:16
+ Install-Package <<<<  EntityFramework
    + CategoryInfo          : NotSpecified: (:) [Install-Package], WebException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
 解決方案:

修改package Source為:http://packages.nuget.org/v1/FeedService.svc/

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM