@@ -12,6 +12,7 @@ open FSharp.Formatting.Templating
1212
1313open Ionide.ProjInfo
1414open Ionide.ProjInfo .Types
15+ open Microsoft.Build .Evaluation
1516
1617[<AutoOpen>]
1718module Utils =
@@ -295,8 +296,16 @@ module Crack =
295296 let cwd = System.Environment.CurrentDirectory |> System.IO.DirectoryInfo
296297 let dotnetExe = getDotnetHostPath () |> Option.map System.IO.FileInfo
297298 let _toolsPath = Init.init cwd dotnetExe
298- ProjectLoader.getProjectInfo projectFile extraMsbuildProperties BinaryLogGeneration.Off customProperties
299- //file |> Inspect.getProjectInfos loggedMessages.Enqueue msbuildExec [gp] []
299+
300+ let projectCollection = new ProjectCollection( dict extraMsbuildProperties)
301+
302+ match ProjectLoader.loadProject projectFile BinaryLogGeneration.Off projectCollection with
303+ | Ok loadedProject ->
304+ match ProjectLoader.getLoadedProjectInfo projectFile customProperties loadedProject with
305+ | Ok( ProjectLoader.LoadedProjectInfo.StandardProjectInfo projOptions) -> Ok projOptions
306+ | Ok _ -> Error $" project '%s {projectFile}' is not a standard project"
307+ | Error e -> Error e
308+ | Error e -> Error e
300309
301310 let msgs = ( loggedMessages.ToArray() |> Array.toList)
302311
@@ -428,7 +437,7 @@ module Crack =
428437
429438 let getProjectsFromSlnFile ( slnPath : string ) =
430439 match InspectSln.tryParseSln slnPath with
431- | Ok(_, slnData) -> InspectSln.loadingBuildOrder slnData
440+ | Ok slnData -> InspectSln.loadingBuildOrder slnData
432441
433442 //this.LoadProjects(projs, crosstargetingStrategy, useBinaryLogger, numberOfThreads)
434443 | Error e -> raise ( exn ( " cannot load the sln" , e))
@@ -442,7 +451,10 @@ module Crack =
442451 let collectionName , projectFiles =
443452 match projects, ignoreProjects with
444453 | [], false ->
445- match Directory.GetFiles( slnDir, " *.sln" ) with
454+ let slnFiles =
455+ [| yield ! Directory.GetFiles( slnDir, " *.sln" ); yield ! Directory.GetFiles( slnDir, " *.slnx" ) |]
456+
457+ match slnFiles with
446458 | [| sln |] ->
447459 printfn " getting projects from solution file %s " sln
448460
0 commit comments