dotnet 核心 F# 控制台项目.如何加载/打开模块? [英] dotnet core F# console proj. How to load/open a module?
本文介绍了dotnet 核心 F# 控制台项目.如何加载/打开模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
RaceConditionTest.fs
RaceConditionTest.fs
namespace FConsole
module RaceConditionTest =
let test x =
...
程序.fs
open System
open FConsole
[<EntryPoint>]
let main argv =
RaceConditionTest.test 1000
0 // return an integer exit code
然后我运行我的控制台应用程序 (linux)
Then I run my console app (linux)
$ dotnet run
错误 FS0039:未定义命名空间或模块FConsole".
error FS0039: The namespace or module 'FConsole' is not defined.
RaceConditionTest.fs
文件顺序有问题吗?如果是这样,我如何指示 *.fs 文件的顺序?
Is the order of files the problem? if so, How do I indicate the order of *.fs files?
推荐答案
正如@boran 在他的评论中所建议的,有这个 FConsoleProject.fsproj
as @boran suggested in his comments there is this FConsoleProject.fsproj
我刚刚在 Program.fs 之前添加了我的文件
I just added my file before Program.fs
<ItemGroup>
<Compile Include="RaceConditionTest.fs" />
<Compile Include="Program.fs" />
</ItemGroup>
这篇关于dotnet 核心 F# 控制台项目.如何加载/打开模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文