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

<p>How to resolve the problem?</p>