I open my project, using nuget - restore my packages, but as i see not all. For example Newtonsoft.Json is missing. I try to install it again using package manager console but get message 'already has a reference to Newtonsoft.Json (version)'
How can i fix this problem with references?
Restore NuGet packagesNavigate to Tools > Options > NuGet Package Manager > General, and then select the Allow NuGet to download missing packages check box under Package Restore. Enabling Restore NuGet Packages. In Solution Explorer, right-click the solution, and then select Restore NuGet Packages.
Quick solution for Visual Studio usersSelect the Tools > NuGet Package Manager > Package Manager Settings menu command. Set both options under Package Restore. Select OK. Build your project again.
nuget restore will ensure all of your NuGet dependencies are downloaded and available to your project. Whereas dotnet restore is a complete restoration of all NuGet dependencies as well as references and project specific tools. Meaning that if you run nuget restore , you are only restoring NuGet packages.
Usually when NuGet doens't restore the packages the problems are:
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