To fix this error from Tools > NuGet Package Manager > Package Manager Console simply run: dotnet restore The error occurs because the dotnet cli does not create the all of the required files initially. Doing dotnet restore adds the required files.
Try the following: Uninstall-Package Newtonsoft.Json -Force Followed by: Install-Package Newtonsoft.Json -Version <press tab key for autocomplete>
Bring up the Package Manager Console in Visual Studio – it’s in Tools / NuGet Package Manager / Package Manager Console. Then run the Install-Package command: Install-Package Common.Logging -Version 1.2.0 See the command reference for details. Edit: In order to list versions of a package you can use the Get-Package command with the remote argument … Read more
I have a similar situation with external and internal package sources with projects referenced in more than one solution. I just got this working with one of our code bases today and it seems to be working with the developer workstations and our build server. The below process has this scenario in mind (although it … Read more
Using the Copy target in the targets file to copy required libraries won’t copy those files to other projects which reference the project, resulting in a DllNotFoundException. This can be done with a much simpler targets file though, using a None element, as MSBuild will copy all None files to referencing projects. <Project xmlns=”http://schemas.microsoft.com/developer/msbuild/2003″> <ItemGroup> … Read more
You can use nuget.exe to restore your packages or with NuGet 2.7, or above, installed you can simply compile your solution in Visual Studio, which will also restore the missing packages. For NuGet.exe you can run the following command for each project. nuget install packages.config Or with NuGet 2.7 you can restore all packages in … Read more
First, download the NuGet command line tool from here. Next, open a command prompt and cd to the directory to which nuget.exe was downloaded. You can list the local caches with this command: nuget locals all -list You can clear all caches with this command: nuget locals all -clear Reference: https://docs.nuget.org/consume/command-line-reference
You can do this a couple of ways. Via the “Solution Explorer” Simply right-click the “References” folder and select “Manage NuGet Packages…” Once that window comes up click on the option labeled “Online” in the left most part of the dialog. Then in the search bar in the upper right type “json.net” Click “Install” and … Read more