Reputation: 105
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,
Upvotes: 1
Views: 4346
Reputation: 331
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"
Upvotes: 4
Reputation: 55185
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.
Upvotes: 3