microsoft / ManagedEsent

MIT License
244 stars 36 forks source link

Can't run on Debian 10 (possibly other Linux instances as well) due to kernel32.dll native call to get ProcessId #43

Closed Clockware closed 3 years ago

Clockware commented 3 years ago

Unhandled exception. System.TypeInitializationException: The type initializer for 'HomeProject.Program' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Microsoft.Database.Isam.Config.DatabaseConfig' threw an exception. ---> System.DllNotFoundException: Unable to load shared library 'kernel32.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libkernel32.dll: cannot open shared object file: No such file or directory at Microsoft.Database.Isam.Win32.NativeMethods.GetCurrentProcessId() at Microsoft.Database.Isam.Config.DatabaseConfig..cctor() --- End of inner exception stack trace --- at Microsoft.Database.Isam.Config.DatabaseConfig..ctor() at Microsoft.Isam.Esent.Collections.Generic.PersistentDictionaryDefaultConfig.GetDefaultDatabaseConfig() at Microsoft.Isam.Esent.Collections.Generic.PersistentDictionary2..ctor(String directory, IConfigSet customConfig, IEnumerable1 dictionary) at Microsoft.Isam.Esent.Collections.Generic.PersistentDictionary2..ctor(String directory) at Logic.Caching.PersistedCache1..ctor(String persistedCachePath, Func2 serialize, Func2 deserialize) in <... not your area anymore>

I tracked it down to DatabaseConfig and yes, it is using Native call to get ProcessId to have a mutex name. Can you please replace native call with something more cross-platform? Thanks in advance.

Building details (run on windows): dotnet publish -r debian10-x64 --self-contained dotnet version: 3.1.403 target: net core app 3.1

May be it's dotnet publish fault (it didn't get something right from platform-dependent nuget?), I'm just really lazy to install SDK on Debian so I expected it to work.

TeddyAlbina commented 3 years ago

Esent is a Windows specific feature

2BitSalute commented 3 years ago

Esent is a Windows specific feature

Correct, ESE is not yet supported on Linux.

skanyal-rubrik commented 2 years ago

Hitting the same stuff. Any plans to support this for linux in near future ?

Unhandled exception. System.TypeInitializationException: The type initializer for 'Microsoft.Isam.Esent.Interop.Api' threw an exception. ---> System.DllNotFoundException: Unable to load shared library 'esent.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libesent.dll: cannot open shared object file: No such file or directory at Microsoft.Isam.Esent.Interop.Implementation.NativeMethods.JetCreateInstance(IntPtr& instance, String szInstanceName) at Microsoft.Isam.Esent.Interop.Implementation.JetApi.JetCreateInstance(JET_INSTANCE& instance, String name) at Microsoft.Isam.Esent.Interop.Implementation.JetApi.GetVersionFromEsent() at Microsoft.Isam.Esent.Interop.Implementation.JetApi.DetermineCapabilities() at Microsoft.Isam.Esent.Interop.Implementation.JetApi..ctor() at Microsoft.Isam.Esent.Interop.Api..cctor() --- End of inner exception stack trace --- at Microsoft.Isam.Esent.Interop.Api.JetGetDatabaseFileInfo(String databaseName, Int32& value, JET_DbInfo infoLevel) at HelloWorld.JetDb..ctor(String dbPath) at HelloWorld.Program.processDatabase(String filename) at HelloWorld.AppEntry.Main(String[] args) Aborted (core dumped)