You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Code built against TextFilter 1.5.x/1.6.x throws MissingMethodException on 1.7.x: the case-sensitivity parameter replaced the IsMatch/Filter/DoesMatchGlob signatures instead of adding overloads #155
#97/#98 added TextFilterCaseSensitivity caseSensitivity = CaseSensitive as a trailing optional parameter and shipped it as a minor version. That changed the signatures of existing public methods in TextFilter/TextFilter.cs:
Filter, both overloads
IsMatch, both overloads
DoesMatchGlob and DoesMatchRegex
AnyTokenMatchesGlobFilter and AllTokensMatchGlobFilter
Default values for optional parameters are filled in at the call site at compile time. So the old 4-parameter IsMatch(string, string, TextFilterType, TextFilterMatchOptions) no longer exists in the binary, and an assembly compiled against it can no longer find it. CompatibilitySuppressions.xml holds only TFM-related CP0001 entries, and package validation against a previous version is not enabled, so nothing caught the break.
Reproduced
BlastMerge pins ktsu.TextFilter 1.5.48. Building it and then running its PathExclusionMatcher.Matches with TextFilter 1.7.14 swapped in throws:
System.MissingMethodException: Method not found: 'Boolean ktsu.TextFilter.TextFilter.IsMatch(System.String, System.String, ktsu.TextFilter.TextFilterType, ktsu.TextFilter.TextFilterMatchOptions)'.
Failure scenario
An application references a library compiled against TextFilter ≤ 1.6 (such as BlastMerge) and also references TextFilter ≥ 1.7, directly or through another package. NuGet resolves to the highest version, so 1.7 is the one that loads. The first time the older library filters anything, it crashes. This is the situation a minor version bump promises cannot happen.
Suggested fix
Restore the pre-1.7 signatures as non-optional overloads that forward with TextFilterCaseSensitivity.CaseSensitive.
Avoid overload ambiguity in new code: either make caseSensitivity required in the new overloads, or keep it optional and mark the restored overloads [EditorBrowsable(EditorBrowsableState.Never)].
Optionally enable package validation (EnablePackageValidation with PackageValidationBaselineVersion set to the last 1.6.x) so CI catches the next break.
Acceptance criteria
An assembly compiled against 1.5.48 or 1.6.x runs against the new version without MissingMethodException.
Existing source still compiles and resolves to the case-sensitivity overloads without ambiguity errors.
Priority: High. A minor release removed public method signatures, so any app that resolves TextFilter ≥ 1.7 alongside a library compiled against ≤ 1.6 (BlastMerge is one, reproduced) crashes with MissingMethodException on its first filter call. Package validation against a baseline would have caught it.
Area: public API surface of TextFilter/TextFilter.cs (Filter, IsMatch, DoesMatchGlob, DoesMatchRegex, token helpers) and package-validation settings
Next step: restore the pre-1.7 signatures as forwarding overloads, and enable EnablePackageValidation with a 1.6.x PackageValidationBaselineVersion so CI blocks the next break.
Activity
matt-edmondson commentedon Oct 28, 2026
Triage
MissingMethodExceptionon its first filter call. Package validation against a baseline would have caught it.TextFilter/TextFilter.cs(Filter,IsMatch,DoesMatchGlob,DoesMatchRegex, token helpers) and package-validation settings* - Copy*,Copy of *,*/My Docs/*) excludes nothing, and would exclude every file after a TextFilter upgrade BlastMerge#109, which depends on how BlastMerge's TextFilter pin moves, and to No way to ask for case-insensitive matching, which blocks two adoption issues #97/Let a caller ask for case-insensitive matching [minor] #98, which introduced the break. No open PR covers it.EnablePackageValidationwith a 1.6.xPackageValidationBaselineVersionso CI blocks the next break.Generated by Claude Code