Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio : Error occurred while restoring nuget packages : There are duplicate packages

When I tried to build my Solution, I got the following error in Visual Studio 2015. Error Occurred while restoring nuget packages..... there are duplicate packages..... Because of this most of my assemblies in references shows an Yellow Triangle and is not restored.

How to resolve the problem?

like image 825
Henry Avatar asked Sep 16 '16 04:09

Henry


1 Answers

Restoring nuget packages can fail in multiple scenarios. In this particular case, it is because of duplicate packages. If you read the full error message you will also find what package is present as duplicate.

To resolve this, open your packages.config file and remove this duplicate package entry from that. Then try to Build or Restore Nuget Packages. Things should work fine.

like image 124
Henry Avatar answered Oct 26 '22 16:10

Henry