首页新闻找找看学习计划

entity framework 5 有没有方法不通过NUGET在VS 2010中安装

0
悬赏园豆:30 [已解决问题] 解决于 2012-11-24 13:05

由于工作环境限制,工作机无法 连接互联网,请问各位有没有办法在VS2010中安装EF 5.0?

三夏健的主页 三夏健 | 初学一级 | 园豆:177
提问于:2012-11-14 11:02
< >
分享
最佳答案
2

原文见下面, 我简单翻译几句吧:

你先在一台能联网的电脑上装NuGet,并且在一个临时项目上下载安装EF5, 然后在这个临时项目文件夹中就可以找到.nupkg 文件, (或在NuGet的Package Manager中浏览Package Cache找到刚才下载的EF5),  然后在你的开发机上安装NuGet, 把它的Feed设为本地( 如何让Nuget读取你本地的feed见如下链接: http://docs.nuget.org/docs/creating-packages/hosting-your-own-nuget-feeds ),  然后把.nupkg文件拷到你开发机中设定的feed文件夹中, 这样在开发机上就可以像联网一样使用NuGet了.

 

What if you can’t connect to the Internet from your development machine. Or what if you are not allowed to install NuGet on your machine. Don’t worry; all is not lost.

First you need to get the NuGet package. For this you do need to be able to connect to the Internet from some machine—but it doesn’t have to be your development machine. You’re reading this so presumably you’re not completely off-the-grid. :-)

You can get the package by using NuGet in Visual Studio on a machine connected to the Internet in the normal way—just install the package you want into a dummy project. After installing the package you can find the .nupkg file either in the dummy project folder or by browsing the Package Cache from the Package Manager Settings menu option.

You can also get the package without Visual Studio by using NuGet.exe.

If you are able to install NuGet on your development machine then do so and setup a local feed. This may sound daunting but it’s really easy. Copy the .nupkg file to your local feed and then use NuGet to install it in the normal way—with no connection to the Internet required.

If you can’t install NuGet on your development machine then take the .nupkg file and rename it to .zip—yep, it’s a zip file. You can now extract EntityFramework.dll from the zip file and use it as you would any other assembly. Note that you will not get any of the automatic project-level integration I mentioned above, so you may have to do more manual configuration of your project.

收获园豆:30
夏狼哉 | 小虾三级 |园豆:833 | 2012-11-14 11:30
其他回答(3)
0

找了一下,好像没有独立的安装包,估计只能是通过nuget来安装了

chenping2008 | 园豆:9836 (大侠五级) | 2012-11-14 11:54
0

哈哈,为什么不愿意用nuget

jerry-Tom | 园豆:4077 (老鸟四级) | 2012-11-14 15:40
0

可以做本地nuget源,网上教程很多吧

alienblog | 园豆:332 (菜鸟二级) | 2012-11-15 12:56
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册