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

微笑、不失礼 提交于 2021-02-08 08:59:19

问题


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,


回答1:


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.




回答2:


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"



来源:https://stackoverflow.com/questions/4906663/f-error-error-fs0039-the-namespace-or-module-mysql-is-not-defined

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!