编译F#多文件工程的文件顺序问题

学习F#时碰到一个奇怪的问题vs2015报错

Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'

在网上搜索了一下。发现stack overflow有解答,摘录一下备忘 点击打开链接


Sounds like this is an order-of-files-in-the-project issue. The last file is the entry point ("main method"), sounds like you have Alg.fs last, and you need Program.fs last. You can re-order them via the right-click context menu in VS Solution Explorer.

简单说,就是多文件工程在VS中需要保证Program.fs放在最后,在VS的解决方案资源管理器中拖拽一下顺序。就可以了 

好不自然的约束啊。明显是偶发复杂性吗。怕忘,因此记录一下。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值