问题
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