2

I have an internal nuget package that depends on Flurl.Http v1.2, which in turn depends on Flurl >= v2.4. An application depends on this internal package, but also depends on Flurl v2.6.

     Application
       /     \
Flurl v2.6   Internal package
               \
             Flurl.Http v1.2
                 \
              Flurl >= v2.4

When the application calls a method on the internal package that uses Flurl.Http, it produces an exception: MissingMethodException: Method not found: 'Flurl.Url Flurl.StringExtensions.AppendPathSegment(System.String, System.Object)'.

It works when I downgrade the application's Flurl dependency to v2.4, but this doesn't feel like a good solution as the application should be able to refernce a higher version. I thought that the solution was to add assembly binding redirects to the App.config, but this had no effect. In fact I've read conflicting opinions on whether binding redirects should be used at all in dotnet core.

What am I missing?

Karel Kral
  • 5,297
  • 6
  • 40
  • 50
NickL
  • 1,870
  • 2
  • 15
  • 35

0 Answers0