F# Fake globbing 运算符和 MSBuild

F# Fake globbing operator and MSBuild

我正在学习 Fake 5 (F# Make),并且正在学习 Getting Started 教程。当我 运行 以下代码时,我收到一条错误消息:tryscript.fsx (6,7)-(6,54): Error FS0001: The type 'Fake.IO.IGlobbingPattern' is not compatible with the type 'seq<'a>'

#r "paket: nuget Fake.IO.FileSystem //"
open Fake.IO.Globbing.Operators
let csProjectFiles = !! "src/app/**/*.csproj"

csProjectFiles
    |> Seq.iter (fun x -> printfn "ProjectFile: %s" x)

// for projectFile in csProjectFiles do
//     printfn "F# ProjectFile: %s" projectFile

但是如果我注释掉从 csProjectFiles |> ... 开始的两行并取消注释最后两行,我将得到预期的文件名输出。 根据 documentation 和 Ionide 工具提示,!! 应该 return 一系列文件名。有人可以告诉我我可能做错了什么吗?

P.S。我正在使用 dotnet tool install fake-cli -g

安装的 Fake 5.3.1

更新。对于这个问题,我没有任何解决方案。它在 Windows 10 获得更新后自行解决,我删除了 %HOMEPATH\.nuget%HOMEPATH%\AppData\Local\Nuget 中的 Nuget 包缓存,并删除了 .fake 文件夹并将文件锁定在与 FAKE 脚本相同的文件夹中然后再次重新运行脚本。

如果您仍然面临类似问题,开发人员会在您清除所有缓存后要求扩展日志 fake -vv run <yourScriptName>.fsx,并在此 运行.[=22= 之后归档 %HOMEPATH%\.nuget\packages\netstandard.library 的内容]

为了完整起见,报告的问题可以在这里找到:https://github.com/fsharp/FAKE/issues/2062

如果有人遇到这个问题,请打开一个新问题(和 link 旧问题)并提供以下信息:

Can you clean everything and send the output of fake -vv run tryscript.fsx and attach the logfile? Something is indeed fishy with the NetStandard.Library package

Can you also compress and attach the folder C:\Users\.nuget\packages\netstandard.library and then try to delete it (and again create a logfile for that)?

我认为这是缓存问题或 F# 编译器错误或两者兼而有之。