I'm trying to create a .NET Web API Application and install EntityFramework using Nuget Package Manager.
But when I'm going to : Right Click on Project References > Manage Nuget Packages > Browse I can't find Microsoft.EntityFrameworkCore in the list.
Then I'm having this error showing at the bottom, in the output section :
[nuget.org] Data at the root level is invalid. Line 1, position 1.
I use VS 2017 15.5.2 and .Net Framework 4.7.02556.
I also get this error when using the dotnet cli command
dotnet add package Microsoft.EntityFrameworkCore :
error: The content at 'https://api.nuget.org/v3/index.json/FindPackagesById()?id='Microsoft.EntityFrameworkCore'' is not valid XML.
error: Data at the root level is invalid. Line 1, position 1.
It looks like that the dotnet cli is trying to load the remote index.json file as a XML file.
For your information, dotnet --version is showing 2.1.3.
Any idea?
Using VS 2019, my solution was to Clear All NuGet Cache(s).
This can be achieved through Options -> NuGet Package Manager -> General -> Clear All NuGet Cache(s).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With