db
是我的MySqlConnection。当我试图运行:db.Open();
我得到这个错误:
The type 'System.Data.Common.DbConnection' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”.
所以我跟着它,并添加System.Data
参考。现在,我得到这个错误:
Reference to type 'Component' claims it is defined in System but it could not be found
我使用的.NET Framework 4.0版中,MySQL连接器v6.9.9,Xamarin窗体v2.3.2.127和所有支持Android v23.4.0.1
附:我读了一些关于PCL的内容,但我不知道我使用的包是PCL。
共享连接字符串。 – Anjali
'db = new MySqlConnection(“Server = 192.168.56.2; port = 3306; User Id = user; Password = aa”);'' – Triti