https://bugzilla.novell.com/show_bug.cgi?id=635335
https://bugzilla.novell.com/show_bug.cgi?id=635335#c0 Summary: Missing method System.Data.Common.DbConnection::EnlistTransaction(Tra nsaction) when using a .NET 2.0 library and compiling with dmcs Classification: Mono Product: Mono: Class Libraries Version: SVN Platform: x86 OS/Version: Linux Status: NEW Severity: Normal Priority: P5 - None Component: Sys.Data AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 Mono version: Git 6445c9afe3e2649ec1c0bc41f859473545ab5d3f (pulled 2010-08-28) OS: Debian Squeeze When running a program that was compiled with dmcs and uses a .NET 2.0 library (SQLite or MySql ADO.NET provider), I get a missing method exception in System.Data. If the program is compiled with gmcs instead or uses the class with the missing method directly, no exception is thrown. Reproducible: Always Steps to Reproduce: 1. Copy System.Data.SQLite.dll to working directory (attached) 2. Create test.cs with the following code: /* code starts */ using System.Data.SQLite; class Program { static void Main() { var connectionString = "Data Source=:memory:;Version=3"; var connection = new SQLiteConnection(connectionString); connection.Open(); var command = new SQLiteCommand("CREATE TABLE Test(t int)", con$ command.ExecuteNonQuery(); } } /* code ends */ 3. dmcs -r:System.Data.SQLite.dll test.cs 4. mono test.exe 5. Notice the exception 6. gmcs -r:System.Data.SQLite.dll test.cs 7. mono test.exe 8. Notice that there is no exception Actual Results: The following exception is thrown when compiled with dmcs and run: Missing method System.Data.Common.DbConnection::EnlistTransaction(Transaction) in assembly /opt/mono/lib/mono/gac/System.Data/4.0.0.0__b77a5c561934e089/System.Data.dll, referenced in assembly /tmp/bug2/System.Data.SQLite.dll Unhandled Exception: System.MissingMethodException: Method not found: 'System.Data.Common.DbConnection.EnlistTransaction'. at Program.Main () [0x00000] in <filename unknown>:0 Expected Results: No exception is thrown I've looked at 2.0 and 4.0 versions of Mono's System.Data.dll with Reflector and method is present in both versions. As noted above, no exception is thrown if program is compiled with gmcs and/or NET 2.0 library is not used. Mono.Data.Sqlite.dll could be used instead of System.Data.SQLite.dll, but the same exception is also thrown when using mysql.data.dll and SQLite is easier to reproduce (does not require a database server). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
