码迷,mamicode.com
首页 > 其他好文 > 详细

使用NuGet安装EntityFramework4.2

时间:2016-03-19 22:41:46      阅读:381      评论:0      收藏:0      [点我收藏+]

标签:

使用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/

 

使用NuGet安装EntityFramework4.2

标签:

原文地址:http://www.cnblogs.com/Alex80/p/5296354.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!