您的位置:首页 > 其它

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

2015-10-09 10:10 344 查看
学习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的解决方案资源管理器中拖拽一下顺序。就可以了 

好不自然的约束啊。明显是偶发复杂性吗。怕忘,因此记录一下。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  .net f# visual studio