diff --git a/src/Features/Core/Portable/CodeFixes/AddImport/AbstractAddImportCodeFixProvider.SearchScope.cs b/src/Features/Core/Portable/CodeFixes/AddImport/AbstractAddImportCodeFixProvider.SearchScope.cs index 59cf278be4310c5c3e2610ec073e5f739f4dd788..5eb2785b115c22599417aad41e16bb0449cdadeb 100644 --- a/src/Features/Core/Portable/CodeFixes/AddImport/AbstractAddImportCodeFixProvider.SearchScope.cs +++ b/src/Features/Core/Portable/CodeFixes/AddImport/AbstractAddImportCodeFixProvider.SearchScope.cs @@ -34,8 +34,9 @@ public async Task>> FindDeclarationsAsync(stri if (Exact) { - // Exact matches always have a weight of 0. This way they come before all other matches. - return symbols.Select(s => SearchResult.Create(s.Name, s, weight: 0)).ToList(); + // We did an exact, case insensitive, search. Case sensitive matches should + // be preffered though over insensitive ones. + return symbols.Select(s => SearchResult.Create(s.Name, s, weight: s.Name == name ? 0 : 1)).ToList(); } // TODO(cyrusn): It's a shame we have to compute this twice. However, there's no