@@ -72,7 +72,7 @@ public async Task<CommandStatus> ExecuteAsync(IEnumerable<PathInfo> paths, strin
72
72
{
73
73
if ( path . Origin == PathOrigin . PipedInput )
74
74
{
75
- Matcher matcher = ( string . Equals ( Path . GetExtension ( path . Path ) , ".sln" , StringComparison . OrdinalIgnoreCase ) )
75
+ Matcher matcher = ( IsSolutionFile ( path . Path ) )
76
76
? ProjectFilter . SolutionMatcher
77
77
: ProjectFilter . Matcher ;
78
78
@@ -225,7 +225,7 @@ private static async Task<ProjectOrSolution> OpenProjectOrSolutionAsync(
225
225
IProgress < ProjectLoadProgress > progress = null ,
226
226
CancellationToken cancellationToken = default )
227
227
{
228
- bool isSolution = string . Equals ( Path . GetExtension ( path ) , ".sln" , StringComparison . OrdinalIgnoreCase ) ;
228
+ bool isSolution = IsSolutionFile ( path ) ;
229
229
230
230
WriteLine ( $ "Loading { ( ( isSolution ) ? "solution" : "project" ) } '{ path } '...", Verbosity . Minimal ) ;
231
231
@@ -405,6 +405,14 @@ private protected async Task<ImmutableArray<Compilation>> GetCompilationsAsync(
405
405
}
406
406
}
407
407
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
+
408
416
protected class ConsoleProgressReporter : IProgress < ProjectLoadProgress >
409
417
{
410
418
public static ConsoleProgressReporter Default { get ; } = new ( ) ;
0 commit comments