我有一个 F# 项目 Rm.Accounting.Domain
,包含以下文件(按照顺序):
Model.fs
:module Rm.Accounting.Domain.Model
Commands.fs
:module Rm.Accounting.Domain.Commands
Events.fs
:module Rm.Accounting.Domain.Events
最后一个文件 Behaviour.fs
导致了问题。
module Rm.Accounting.Domain.Behaviour
open Rm.Accounting.Domain.Commands
open Rm.Accounting.Domain.Events
open Rm.Accounting.Infrastructure
let a = 42
这导致了两个错误:
Behaviour.fs(3, 20): [FS0039] The namespace 'Domain' is not defined.
->打开 Rm.Accounting.Domain.Commands
Behaviour.fs(4, 20): [FS0039] The namespace 'Domain' is not defined.
->打开 Rm.Accounting.Domain.Events
Behaviour.fs
,项目可以编译。我不确定为什么这两个导入会引起一些麻烦。
Behaviour.fs:
" - Natalie Perret