F#错误“错误FS0039:未定义名称空间或模块'MySql'"? [英] F# error 'error FS0039: The namespace or module 'MySql' is not defined'?

查看:79
本文介绍了F#错误“错误FS0039:未定义名称空间或模块'MySql'"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好我尝试连接F#和MySQL数据库,但出现了以下错误:错误FS0039:未定义名称空间或模块"MySql".到目前为止,我试图引用包含MySQL.Data.dll的文件夹:项目->添加引用->浏览-> C:\ Program Files(x86)\ MySQL \ MySQL Connector Net 6.3.6 \ Assemblies \ v2.0我也讨厌引用MySQL.Data.但是每次,我都会收到此错误.谢谢你的帮助.问候

Hello I try to connect F# and MySQL database, but i got fallowing error :error FS0039: The namespace or module 'MySql' is not defined. So far,i tried to reference the folder which contains MySQL.Data.dll:project -> add reference->browse -> C:\Program Files (x86)\MySQL\MySQL Connector Net 6.3.6\Assemblies\v2.0 Also i tired to reference MySQL.Data,too. But each time,i get this error. Thanks for your help. Regards,

推荐答案

F#交互式窗口不了解您的项目引用,因此您需要使用 #r 指令显式注册它们.例如,尝试在F#Interactive中键入 #r"MySql.Data" #r @"C:\ ... \ MySql.Data.dll" 使用 MySql 命名空间中的任何类型.

The F# interactive window is unaware of your project references, so you need to explicitly register them using the #r directive. For example, try typing #r "MySql.Data" or #r @"C:\...\MySql.Data.dll" into F# interactive before attempting to use any of the types in the MySql namespace.

这篇关于F#错误“错误FS0039:未定义名称空间或模块'MySql'"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆