diff --git a/src/fsharp/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs b/src/fsharp/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs index 93adc72d28..baf8102279 100644 --- a/src/fsharp/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs +++ b/src/fsharp/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs @@ -20,7 +20,7 @@ type ProjectCracker = let referencedProjects = Array.map (fun (a, b) -> a, convert b) opts.ReferencedProjectOptions let sourceFiles, otherOptions = - opts.Options |> Array.partition (fun x -> Path.GetExtension(x).ToLower() = ".fs") + opts.Options |> Array.partition (fun x -> x.IndexOfAny(Path.GetInvalidPathChars()) = -1 && Path.GetExtension(x).ToLower() = ".fs") let sepChar = Path.DirectorySeparatorChar