@@ -72,7 +72,7 @@ public async Task<CommandStatus> ExecuteAsync(IEnumerable<PathInfo> paths, strin
7272 {
7373 if ( path . Origin == PathOrigin . PipedInput )
7474 {
75- Matcher matcher = ( string . Equals ( Path . GetExtension ( path . Path ) , ".sln" , StringComparison . OrdinalIgnoreCase ) )
75+ Matcher matcher = ( IsSolutionFile ( path . Path ) )
7676 ? ProjectFilter . SolutionMatcher
7777 : ProjectFilter . Matcher ;
7878
@@ -225,7 +225,7 @@ private static async Task<ProjectOrSolution> OpenProjectOrSolutionAsync(
225225 IProgress < ProjectLoadProgress > progress = null ,
226226 CancellationToken cancellationToken = default )
227227 {
228- bool isSolution = string . Equals ( Path . GetExtension ( path ) , ".sln" , StringComparison . OrdinalIgnoreCase ) ;
228+ bool isSolution = IsSolutionFile ( path ) ;
229229
230230 WriteLine ( $ "Loading { ( ( isSolution ) ? "solution" : "project" ) } '{ path } '...", Verbosity . Minimal ) ;
231231
@@ -405,6 +405,14 @@ private protected async Task<ImmutableArray<Compilation>> GetCompilationsAsync(
405405 }
406406 }
407407
408+ private static bool IsSolutionFile ( string path )
409+ {
410+ string extension = Path . GetExtension ( path ) ;
411+
412+ return string . Equals ( extension , ".sln" , StringComparison . OrdinalIgnoreCase )
413+ || string . Equals ( extension , ".slnf" , StringComparison . OrdinalIgnoreCase ) ;
414+ }
415+
408416 protected class ConsoleProgressReporter : IProgress < ProjectLoadProgress >
409417 {
410418 public static ConsoleProgressReporter Default { get ; } = new ( ) ;
0 commit comments