Ios 祖梅罗·沙马林赢得';不编译

Ios 祖梅罗·沙马林赢得';不编译,ios,sqlite,xamarin.ios,xamarin,zumero,Ios,Sqlite,Xamarin.ios,Xamarin,Zumero,我试图使用Zumero Xamarin组件,但我得到了一个编译器错误 The type 'System.Data.Common.DbConnection' is defined in an assembly that is not referenced. 我将该组件包括到我的项目中,并添加了以下代码 using System.Data.SQLite; 及 按照同样的步骤,这个问题也会发生在我身上 如果我随后添加对System.Data的引用,错误就会消失,代码也会编译。查看您的屏幕截图,您

我试图使用Zumero Xamarin组件,但我得到了一个编译器错误

The type 'System.Data.Common.DbConnection' is defined in an assembly that is not referenced.
我将该组件包括到我的项目中,并添加了以下代码

using System.Data.SQLite;

  • 按照同样的步骤,这个问题也会发生在我身上

  • 如果我随后添加对System.Data的引用,错误就会消失,代码也会编译。查看您的屏幕截图,您似乎没有System.Data的引用。在“项目”菜单下,选择“编辑引用”,确保“所有”选项卡处于打开状态,然后在System.Data旁边打勾

  • 我正在使用最近发布的Xamarin.iOS 6.4。我不记得以前需要执行此步骤,这表明以前版本的Xamarin.iOS可能默认包含对System.Data的引用。我还有一点不确定的地方需要消除


  • 我希望这有帮助。

    非常感谢Eric!工作得很好!你是最棒的!
            string personalFolder = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
            string dbName = "pitches.db";
            string dbPath = Path.Combine ( personalFolder, dbName);
            var conn = new  SQLiteConnection ("Data Source=" + dbPath); 
            conn.Open (); 
            conn.ZumeroRegister();