You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FSharp.Formatting picked up a dependency on getProjectInfo (which uses loadProject), but they no longer seem to work.
I note these don't have tests in this repo so we should add those
The error I was getting was:
skipping project 'FSharp.Formatting.Markdown.fsproj' ... error - The SDK 'Microsoft.NET.Sdk' specified could not be found.
I think because they don't know toolsPath. Anyway I replaced getProjectInfo by this snippet I found in the test suites
let loadProject (path: string) =
let cwd = System.IO.Path.GetDirectoryName path |> System.IO.DirectoryInfo
let toolsPath = Ionide.ProjInfo.Init.init cwd None
let tfm = ProjectLoader.getTfm path (dict extraMsbuildProperties)
let readingProps =
Ionide.ProjInfo.ProjectLoader.getGlobalProps path tfm extraMsbuildProperties
|> Seq.toList
|> List.map (fun (KeyValue(k,v)) -> (k,v))
let loader = WorkspaceLoader.Create(toolsPath, readingProps)
loader.LoadProjects([ path ], customProperties, BinaryLogGeneration.Off)
That seemed to improve things though I now get another error:
skipping project 'FSharp.Formatting.Markdown.fsproj' because an error occurred while cracking it: System.Exception: error - System.ArgumentException: The input sequence was empty. (Parameter 'source')
at Microsoft.FSharp.Collections.SeqModule.Head[T](IEnumerable`1 source) in D:\a\_work\1\s\src\fsharp\FSharp.Core\seq.fs:line 1364
at Ionide.ProjInfo.SdkDiscovery.versionAt(DirectoryInfo cwd, FileInfo dotnetBinaryPath) in D:\a\proj-info\proj-info\src\Ionide.ProjInfo\Library.fs:line 106
at Ionide.ProjInfo.Init.init(DirectoryInfo workingDirectory, FSharpOption`1 dotnetExe) in D:\a\proj-info\proj-info\src\Ionide.ProjInfo\Library.fs:line 182
at fsdocs.Crack.parseProject@196(FSharpList`1 extraMsbuildProperties, FSharpList`1 customProperties, String path) in E:\GitHub\dsyme\FSharp.Formatting\src\fsdocs-tool\ProjectCracker.fs:line 199
log -
at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1439.Invoke(String message) in D:\a\_work\1\s\src\fsharp\FSharp.Core\printf.fs:line 1439
at fsdocs.Crack.projectInfos@392.Invoke(String p) in E:\GitHub\dsyme\FSharp.Formatting\src\fsdocs-tool\ProjectCracker.fs:line 394```
The text was updated successfully, but these errors were encountered:
FSharp.Formatting picked up a dependency on
getProjectInfo
(which usesloadProject
), but they no longer seem to work.I note these don't have tests in this repo so we should add those
The error I was getting was:
I think because they don't know toolsPath. Anyway I replaced
getProjectInfo
by this snippet I found in the test suitesThat seemed to improve things though I now get another error:
The text was updated successfully, but these errors were encountered: