通配符文件包含在带有F#的.NET Core项目中

Bri*_*van 3 f# .net-core

我使用aspnetYeoman模板尝试使用F#的ASP.NET Core ,我找到了一些我没想到的东西project.json:

"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true,
"debugType": "portable",
"compilerName": "fsc",
"compile": {
  "includeFiles": [
    "Controllers.fs",
    "Startup.fs",
    "Program.fs"
  ]
}
Run Code Online (Sandbox Code Playgroud)

如果我移动任何现有文件,我会收到构建错误.如果我将includeFiles属性更改为具有值的单个字符串*.fs,我会收到以下消息:

'includeFiles'属性不能包含通配符.

dotnetCLI中的F#项目模板也包含了这种结构project.json.

必须将每个文件添加到您的project.json手动中,这似乎是使用F#和.NET Core相当大的生产力障碍.目前有什么方法吗?

Jür*_*zel 6

在F#中,您必须明确定义编译源文件的顺序.

因此,在任何F#构建系统中,通配符都没有意义.

关于组织模块和文件的好文章