I wanted to use two different version same library (OpenCVSharp 2.x and OpenCVSharp 3.x) Well i downloaded those two packages both to the separate project (lets call it OCV2
As already stated there is nothing wrong with referencing 2 different versions of of a NuGet package, as long as it's in different Visual Studio Projects that those references are made.
But this is also where the easy part ends, but I think there are a few options left. Depending on your needs I see the following options.
Hope this helps a bit, so you don't have to modify third party source code next time.
OK so, I solve this by downloading whole sourcecode for 2.X wrapper version. Renamed its namespace to ABCDEF2 where ABCDEF was original namespace. Build my own nuget package with my own key and... publish it to our private nuget server. This is such a lame solution but there is no other way than manually downloading the original packages and reference it directly with different filename etc and you loose nuget advantages.