13

Is it possible to have 2 different versions of the same NuGet package (in my case it's jQuery 1.10.1 & 2.0.2) within same project?

If yes, how can we do that?

chwarr
  • 6,777
  • 1
  • 30
  • 57
Bhargava
  • 329
  • 5
  • 13
  • 1
    From a JS reference perspective this could really screw things up – Micah Armantrout Jul 09 '13 at 18:08
  • @MicahArmantrout: I was planning to add these 2 NuGet packages side-by-side so as to load one file on a Page depending on browser being IE8 or not... since I heard that IE8 support is removed in jquery 2.0.2. – Bhargava Jul 09 '13 at 18:13
  • 3
    Your need/approach is sound, it is just that the `NuGet` mechanism is not geared towards solving your problem. – Karl Anderson Jul 09 '13 at 18:16
  • https://stackoverflow.com/questions/34802007/using-two-different-versions-of-same-the-nuget-package – AnorZaken Apr 08 '20 at 11:52

1 Answers1

14

The short answer is no.

Check out NuGet issue Allow side-by-side versions of jQuery (and others). It was closed by Phil Haack (NuGet contributor) with message "won't fix".

The recommended workaround by Phil Haack is "You've hit the boundaries of NuGet. Just reference one of them using a CDN or manually add the script files."

chwarr
  • 6,777
  • 1
  • 30
  • 57
Karl Anderson
  • 34,606
  • 12
  • 65
  • 80