3

Here is my solution layout:

.Net Core Web API Service Solution  
  |  
  +-- Project A  
  |     | Nuget Package Dependencies
  |     +-- Jil v2.15.4
  |
  +-- Project B
        | Nuget Package Dependencies
        +-- Jil v2.17.0

Version 2.16.0 of Jil had a breaking change introduced. So when my Project A tries to just use version 2.17.0 it has a run time error.

In .Net Core, is it possible to use two different versions of a NuGet package in one application? If so, how?

Vaccano
  • 78,325
  • 149
  • 468
  • 850
  • No. It never was - both in .NET Old and .NET Core you can only have one version of an assembly. – Panagiotis Kanavos Mar 10 '20 at 17:25
  • That's not true. In both it is possible to load multiple versions of a single assembly at the same time, but it involves a lot of extra work. Tooling like NuGet won't help you, you're going to need to do a lot of your own scripting to get things in the right place, plus code or configuration to tell the runtime where to find the different versions. If your app, or your dependencies, have leaky abstractions and you need to pass objects between the different versions, that won't work (I think). – zivkan Mar 10 '20 at 18:12

0 Answers0