Once upon a time i asked if there was a way to use a sqlite db on windows/linux w/o two binaries. Someone suggested using mono and i asked if .NET on windows requires a mono install and was told no.
I grabbed this reference file from my linux vm
mono\gac\Mono.Data.Sqlite\2.0.0.0__0738eb9f132ed756\Mono.Data.Sqlite.dll
Then i wrote these two lines in my main()
var connection = new Mono.Data.Sqlite.SqliteConnection("Data Source=test.db3");
connection.Open();
I get this exception
System.TypeInitializationException was unhandled
Message=The type initializer for 'Mono.Data.Sqlite.SqliteConvert' threw an exception.
Source=Mono.Data.Sqlite
TypeName=Mono.Data.Sqlite.SqliteConvert
StackTrace:
at Mono.Data.Sqlite.SqliteConvert.Split(String source, Char separator)
at Mono.Data.Sqlite.SqliteConnection.ParseConnectionString(String connectionString)
at Mono.Data.Sqlite.SqliteConnection.Open()
at rsa_test.Program.Main(String[] args) in Program.cs:line 56
InnerException: System.ArgumentException
Message=Value does not fall within the expected range.
Source=mscorlib
StackTrace:
at System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(Array array, RuntimeFieldHandle fldHandle)
at Mono.Data.Sqlite.SqliteConvert..cctor()
InnerException:
So is it not possible to use mono sqlite w/o mono being installed? or did i do something wrong?