学习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的解决方案资源管理器中拖拽一下顺序。就可以了
好不自然的约束啊。明显是偶发复杂性吗。怕忘,因此记录一下。