Home > Mobile >  Is there any extension to make LiteDB work in .NET 6?
Is there any extension to make LiteDB work in .NET 6?

Time:09-26

Is there any extension, tool, package, or whatever that can make LiteDB work in .NET 6? Or do I absolutely have to use a different DB?

I had a project in .NET 4.6.1 that uses LiteDB and I'm asked to create a "Version 2" of that project by using .NET 6, amongst other technologies. My project is giving an error at the LiteDB part, and I just noticed that LiteDB might not work with .NET 6. I was thinking maybe there's some hack or extension or whatever that allows this to work

Edit : LiteDB actually works with .NET 6. My error was

System.MissingMethodException: 'Method not found: 'Void System.Threading.Mutex..ctor(Boolean, System.String, Boolean ByRef, System.Security.AccessControl.MutexSecurity

when I was trying to access the db. Turns out, I merely forgot to install LiteDB Nuget Package on the .NET 6 app that was calling my LiteDB library

CodePudding user response:

LiteDB `5.x` is .NET Framework 4.5 and .NET Standard 2.0 compatible. You can work with LiteDB in any target framework that .NE TStantard 2.0 is compatible, like:

- .NET 5
- .NET Core 2 
- .NET Framework 4.6.1
- Mono 5.4
- Xamarin.iOS 10.14
- Xamarin.Mac 3.8
- Xamarin.Android 8
- UWP 10.0.16299
- Unity 2018.1

https://docs.microsoft.com/pt-br/dotnet/standard/net-standard

 

CodePudding user response:

Found that actually liteDB '5.x' works fine with .NET 6. I was just having some trouble with the installation

  • Related