I want to install an older version of a package (Newtonsoft.Json
). But NuGet rolls back:
PM> Install-Package Newtonsoft.Json -Version 4.0.5 Successfully installed 'Newtonsoft.Json 4.0.5'. Install failed. Rolling back... Install-Package : Already referencing a newer version of 'Newtonsoft.Json'.
How can I do it?
Right-click the Packages folder in the project, and select Update. This will update the NuGet package to the latest version. You can double-click the Add packages and choose the specific version.
Add The NuGet Package to you ProjectRight-click on the project's References and click Manage NuGet Packages. In the NuGet Package Manager, select online from the menu and search “New NuGet Package” and click Install.
Try the following:
Uninstall-Package Newtonsoft.Json -Force
Followed by:
Install-Package Newtonsoft.Json -Version <press tab key for autocomplete>
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