简体   繁体   English

F#:命名空间/模块是遥不可及的

[英]F#: namespaces / modules are out of reach

I just started with F#. 我刚开始使用F#。 I am with MS VS 2012. 我和MS VS 2012在一起。

I am trying to follow some MSDN examples (f.ex: http://msdn.microsoft.com/en-us/library/vstudio/hh225374(v=vs.110).aspx ) and I have already hit a snag: namespaces that should in theory be accessible are in fact out of reach. 我试图关注一些MSDN示例(f.ex: http//msdn.microsoft.com/en-us/library/vstudio/hh225374 (v = vs.110) .aspx )我已经遇到了障碍:理论上应该可访问的名称空间实际上是遥不可及的。

open System.Data

results in "The namespace 'Data' is not defined. 结果“未定义名称空间'数据'。

open Microsoft.FSharp.Data.TypeProviders

generates in "The namespace 'TypeProviders' is not defined. 生成在“名称空间'TypeProviders'中未定义。

Not sure what I should do. 不知道该怎么做。 Do the packages need to be installed somewhere? 包裹是否需要安装在某个地方? The MSDN tutorial does not mention this. MSDN教程没有提到这一点。

Thanks. 谢谢。

Right-click on the project and select 'Add reference…', then under 'Assemblies', select 'Extensions'. 右键单击项目并选择“添加引用...”,然后在“装配”下选择“扩展”。 Then you should find FSharp.Data.TypeProviders in the assembly list. 然后,您应该在程序集列表中找到FSharp.Data.TypeProviders

Alternatively, you can install the FSharp.Data.TypeProviders NuGet package : 或者,您可以安装FSharp.Data.TypeProviders NuGet包

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM