0

I started to learn Entity Framework. I created a console application in Visual Studio 2019 and I try to install Entity Framework from Nuget Package Manager:

Screenshot of nuget package* enter image description here enter image description here

but Entity Framework is not showing up in the Nuget Browse Tab...

Can you please give me a solution how to install Entity Framework in Visual Studio 2019?

pune
  • 79
  • 2
  • 9
  • 1
    Does the `Package Source` at the top right contain `NuGet`? Did you delete the NuGet source by accident perhaps? – Panagiotis Kanavos Aug 02 '21 at 14:35
  • 1
    @pune: In the Visual Studio go to **_Tools > Options... > NuGet Package Manager_**. Check that the _Package sources_ has reference to [https://api.nuget.org/v3/index.json](https://api.nuget.org/v3/index.json) – Jackdaw Aug 02 '21 at 14:52
  • @Jackdaw, There is no reference of https://api.nuget.org/v3/index.json in package source. How i reference to https://api.nuget.org/v3/index.json this ? – pune Aug 02 '21 at 15:11
  • @pune: The _Package sources_ usually set like on the following screenshot: [Package sources](https://i.imgur.com/Z4SRJsR.png) – Jackdaw Aug 02 '21 at 15:17
  • @Jackdaw,I uploade one more screenshot in question, pls see, i add https://api.nuget.org/v3/index.json in package source, till not show Entity Framework in nuget package manager – pune Aug 02 '21 at 15:24
  • @pune: Use **_Up_** button to move the _api.nuget.org/v3/index.json_ source to the first line. On your screenshot it at the third line. Or you can use `Package Source` combo box in the _Manage Packages for Solution..._ dialog to select the current [Package source](https://i.imgur.com/Rk7mHHU.png). On your screen-shot as you can see it set to **_Microsoft Visual Studio Offline Packages_** this why you list does not refreshing. – Jackdaw Aug 02 '21 at 15:46
  • @Jackdaw, I move up api.nuget.org/v3/index.json to top but till not working, How i use Package Source combo box i not understand. There other solution available ? i really want to install Entity Framework through Nuget package manager. Please Please give me solution please – pune Aug 02 '21 at 15:47
  • @Jackdaw, Is Any other solution available ? – pune Aug 02 '21 at 15:58
  • @pune: Did you select `NuGet Online` in the `Package Source` combo box on the _Manage Packages for Solution..._ dialog? Described above is the best solution. – Jackdaw Aug 02 '21 at 16:01
  • @Jackdaw,I select but not work,i try to select nuget.org but there is no option of nuget.org... There only show two options Packages.config and PackageReference...not showing nuget.org – pune Aug 02 '21 at 16:09
  • @pune: There is no option `nuget.org` because on my screen-shot it was, but on you dialog it changed to `NuGet Online`. Doesn't matter. Select `NuGet Online` in the `Package Source` combo box on the `Manage Packages for Solution...` dialog and try to search for required packages. – Jackdaw Aug 02 '21 at 16:18
  • @pune: The latest screenshot useless. Can you press `Cancel` on the `Options` dialog and that make a new screenshot without this dialog? – Jackdaw Aug 02 '21 at 16:22
  • @Jackdaw :Ok i cancel screenshot, I do all things, i select Nuget Online,Restart VS 2019 , but i not get Entity Framework package, You really helpful but i till not get solution,Thank you for your great help...pls give me solution of this . How i install Entity Framework package – pune Aug 02 '21 at 16:37
  • @Jackdaw : Sir, I try to install Entity Framework using package manager console,,but above error occures pls see screenshot , i attached screenshot, and please help – pune Aug 02 '21 at 16:52
  • @pune: All of the previous remarks were intended to describe you how to set packages sources correctly. According to you last screen-short you didn't set packages sources properly. One more time. In the Visual Studio go to **Tools > Options... > NuGet Package Manager > Package Sources**. And define **ONLY ONE** package source like on this screenshot: [Package Source Definition](https://i.imgur.com/Z4SRJsR.png) – Jackdaw Aug 02 '21 at 22:13
  • @Jackdaw : I set only one package source and its working...Thank you so much Sir....After that its possible to install and i install entity framework through Package Manager Console......How i directly install Entity Framework through Nuget Package Manager? – pune Aug 03 '21 at 05:04

0 Answers0