Problem: Unable to resolve dependencies of NuGet packages
When you upgrade the site by installing Telerik.Sitefinity.All or Progress.Sitefinity.Headless NuGet package, Visual Studio throws the following error:
Unable to resolve dependencies. 'Progress.Sitefinity.Authentication 10.0.6421' is not compatible with 'Telerik.Sitefinity.Core 10.1.6523
Unable to resolve dependency 'Telerik.Sitefinity.AmazonCloudSearch'. Source(s) used: 'Sitefinity NuGet Server', 'nuget.org', 'Microsoft Visual Studio Offline Packages.
The cause for this error is that NuGet cache conflicts with the build of the site.
Solution
To resolve the problem, perform the following:
- Clear the NuGet cache files.
Perform the following:
- In Visual Studio, navigate to Tools » NuGet Package Manager » Package Manager Console.
- In the console that opens, run the following command:
dotnet nuget locals global-packages --clear
- Confirm that the nuget.org (
https://api.nuget.org/v3/index.json) and Sitefinity NuGet Server (https://nuget.sitefinity.com/nuget) are configured in Visual Studio.
To do this, navigate to Tools » NuGet Package Manager » Package Manager Settings » Package Sources.
- Delete all packages from the
packages folder, located in your project's folder.
- Reinstall the correct version of
Telerik.Sitefinity.All or Progress.Sitefinity.Headless depending on your project.
- Restore and rebuild your project.