File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,16 @@ namespace dotnet_bsp;
99
1010internal static class BuildHelper
1111{
12+ public static string [ ] SolutionFileExtensions = [ ".sln" , ".slnx" ] ;
13+
1214 internal static IEnumerable < string > ExtractProjectsFromSolutions ( BuildTargetIdentifier [ ] targets )
1315 {
1416 var projList = targets
1517 . Where ( x => Path . GetExtension ( x . ToString ( ) ) == ".csproj" )
1618 . Select ( x => x . Uri . AbsolutePath )
1719 . ToList ( ) ;
1820 var slnList = targets
19- . Where ( x => Path . GetExtension ( x . ToString ( ) ) == ".sln" ) ;
21+ . Where ( x => SolutionFileExtensions . Contains ( Path . GetExtension ( x . ToString ( ) ) ) ) ;
2022 foreach ( var target in slnList )
2123 {
2224 var slnFile = SolutionFile . Parse ( target . ToString ( ) ) ;
Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ private IReadOnlyList<BuildTarget> GetBuildTargetsInWorkspace(string workspacePa
4242 logger . LogInformation ( "Search solution files in: {}" , workspacePath ) ;
4343 //TODO: think about the implications to search for all sln files in workspace
4444 var slnFilePath = Directory
45- . GetFiles ( workspacePath , "*.sln" )
45+ . GetFiles ( workspacePath )
46+ . Where ( x => BuildHelper . SolutionFileExtensions . Contains ( Path . GetExtension ( x ) ) )
4647 . Take ( 1 )
4748 . SingleOrDefault ( ) ;
4849 var projectFiles = new List < string > ( ) ;
You can’t perform that action at this time.
0 commit comments