0

I am trying to install latest entity framework using nuget. Some how our company proxy wont allow to connect to nuget. Hence we downloaded the package from

packages.nuget.org/v1/Package/Download/EntityFramework/

The downloaded file is a zip file that contains stuff and one NUSPEC file. My understanding was that I needed an NUPKG file to install a package but I am not sure how do I install this package.

Have I downloaded the correct file ? or how do I install this package then ?

Muds
  • 4,006
  • 5
  • 31
  • 53
  • 1
    _"The downloaded file is a zip file that contains stuff and one NUSPEC file"_ - that _is_ the nupkg file. – CodeCaster Jun 03 '15 at 12:57
  • That URL *does* download a NuGet package. What are you asking? – Panagiotis Kanavos Jun 03 '15 at 12:57
  • Just put the nupkg file in a local folder and add it in the nuget settings – adrianm Jun 03 '15 at 12:57
  • code caster -- that's a zip file downloaded. – Muds Jun 03 '15 at 12:58
  • I'm not sure what you mean. That link you posted lets you download a .nupkg file. This is a file in PK zip format, yes, but that's what a .nupkg is. See [How to install a Nuget Package .nupkg file locally?](http://stackoverflow.com/questions/10240029/how-to-install-a-nuget-package-nupkg-file-locally). – CodeCaster Jun 03 '15 at 12:59
  • 1
    @Muds, a Nuget package is a zip file with specific contents and an extension of `.nuget`. Hitting that URL downolads a 4MB `.nuget` file that contains Entity Framework. Did your file have a different extension? If so, your firewall toyed with it – Panagiotis Kanavos Jun 03 '15 at 13:00
  • @Muds - take a `NUPKG` file, rename the extension `ZIP` and you'll see a standard zip file. Take a `ZIP` file with the right layout (say, a `NUSPEC` at the root and other files) and rename it `NUPKG` and you've created a package. – Damien_The_Unbeliever Jun 03 '15 at 13:00
  • @PanagiotisKanavos - I guess you are right, filewall must have player foul... let me rename and test again – Muds Jun 03 '15 at 13:02
  • @Muds I suggest you have a talk with your network folks. NuGet is a release channel for updates, fixes to .NET itself. By blocking it, they are forcing you to either use old and unfixed versions, or manually update packages when you realize that there *are* updates available. – Panagiotis Kanavos Jun 03 '15 at 13:04
  • i did that in first place mate, but guess they cant fix it somehow.. dunno whats wrong there really – Muds Jun 03 '15 at 13:05
  • @PanagiotisKanavos - i don't think this is duplicate to what you linked, its actually about wrong extension, i changed it to nupkg and it works now. – Muds Jun 03 '15 at 13:07
  • 2
    @Muds in that case it would be out of scope as an issue that can't be reproduced, or a networking issue – Panagiotis Kanavos Jun 03 '15 at 13:14
  • yea cant deny that, but your answer helped me.. hence it can be useful for someone else, but if its against rules, I would vote for closing! – Muds Jun 03 '15 at 13:15

1 Answers1

6

If you have the nupkg locally, you can simply create a folder on the local file system anywhere, and add that as a custom source - just drop the nupkg into that folder; I do this all the time for presentations, etc:

enter image description here

Marc Gravell
  • 1,026,079
  • 266
  • 2,566
  • 2,900