-
Notifications
You must be signed in to change notification settings - Fork 934
Xamarin .NET Standard 2.0.3 ConfigurationManager throws PlatformNotSupported exception in NHibernateLogger #2105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You'll need to write own driver for SQLite. |
So SQLite is supported for Windows, Linux, MacOS and other .NET Standard platforms but not for Xamarin? |
If we're talking about System.Data.SQLite (this is what SQLiteDriver uses) then it supports only Windows, MacOS and Linux. Other platforms are not supported. The SQLite ADO.NET provider which supports Xamarin Android is Mono.Data.Sqlite, which is not supported by NHibernate by default. You can write own provider for it. Or use this one: https://stackoverflow.com/a/7645822/259946 |
i tried it like you mention it, but the error got thrown even befor nhibernate wants to load the driver.
If i create a new dll with just the code from stackoverflow and add
is there any kind of tutorial for this or a fork? also there comes this error for mono.data.sqlite if i want to use it with .net standard
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
You don't actualy need any packages. Mono.Data.Sqlite assembly is already part of Mono/Xamarin. You just need to add a reference to the project like this: <Reference Include="Mono.Data.Sqlite" /> This needed to be included into the App project which targeds Xamarin, not netstandard2.0. |
NHibernateSQLiteTest.zip If i move the Ref to Mono.Data.SQLite from NHibernateSQLiteTest to NHibernateSQLiteTest.Android there is no diffrent |
Ok, this is the
|
yes, that's the problem in this issue. any idea who i can make nhiberate to get working with mono in this kind of project? |
Is the ConfigurationManager not usable for Xamarin.Android? |
This is the root cause: https://github.com/dotnet/corefx/issues/18832 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
On version 5.3 and above to skip all configuration calls set ConfigurationProvider.Current to null:
|
i have a xamarin .net standard 2.0.3 project and try to use nhibernate with sqlite but get the error "System.PlatformNotSupportedException"
The error comes within this code from a .net standard 2.0.3 project:
With just a (xunit) testproject and the nhibernate project this code works fine, but not if i want to start this code within an andorid system.
The text was updated successfully, but these errors were encountered: