简体   繁体   English

F#错误'错误FS0039:未定义名称空间或模块'MySql'?

[英]F# error 'error FS0039: The namespace or module 'MySql' is not defined'?

Hello I try to connect F# and MySQL database, but i got fallowing error :error FS0039: The namespace or module 'MySql' is not defined. 您好,我尝试连接F#和MySQL数据库,但出现了以下错误:错误FS0039:未定义名称空间或模块'MySql'。 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. 到目前为止,我试图引用包含MySQL.Data.dll的文件夹:项目->添加引用->浏览-> C:\\ Program Files(x86)\\ MySQL \\ MySQL Connector Net 6.3.6 \\ Assemblies \\ v2.0我也讨厌引用MySQL.Data。 But each time,i get this error. 但是每次,我都会收到此错误。 Thanks for your help. 谢谢你的帮助。 Regards, 问候,

Or If you added the any framework / Extensions into your solution. 或者如果您在解决方案中添加了任何框架/扩展。 You may right click the reference folder in the Solution Explorer then click "Send Reference to F# Interactive" 您可以在解决方案资源管理器中右键单击参考文件夹,然后单击“将参考发送到F#Interactive”

The F# interactive window is unaware of your project references, so you need to explicitly register them using the #r directive. F#交互式窗口不知道您的项目引用,因此您需要使用#r指令显式注册它们。 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. 例如,在尝试使用MySql命名空间中的任何类型之前,请尝试在F#Interactive中键入#r "MySql.Data"#r @"C:\\...\\MySql.Data.dll"

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

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