-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Describe the bug
The following change:
c969747?diff=split#diff-fd5240c0eeb1a04bc0c9ea9b5210c8a8ce6703011459c72d49ee4b0c08e61224R292
Introduces a default parameter to a number of extensions (FileParameterOptions? options = null
)
Binaries previously compiled against the old version (lacking the default arg) will fail to find the method at runtime.
(see this answer on SO)
What will result, will be a runtime binding exception:
System.MissingMethodException: Method not found: 'RestSharp.RestRequest RestSharp.RestRequestExtensions.AddFile(RestSharp.RestRequest, System.String, Byte[], System.String, System.String)'.
To Reproduce
- Compile an assembly A using the method without the new default option (108.0.1)
a. Expose that code path - Create a new project that depends on both that assembly and uses 108.0.2
- Call the code path exposed in 1.a
Expected behavior
The method works succesfully
Stack trace
n/a
Desktop (please complete the following information):
n/a
Additional context
It is important that the assembly produced in step 1 is referenced as binary not as source (project), since its a binary breaking change, not a source breaking change.
The code of the assembly A would still compile, if REcompiled against version 108.0.2, it is the runtime binding that would fail.