Plexois37 opened a new issue, #889: URL: https://github.com/apache/lucenenet/issues/889
### Is there an existing issue for this? - [X] I have searched the existing issues ### Describe the bug I get the following Exception: System.TypeInitializationException HResult=0x80131534 Message=The type initializer for "Lucene.Net.Diagnostics.Debugging" threw an exception. Source=Lucene.Net StackTrace: at Lucene.Net.Store.BaseDirectory.SetLockFactory(LockFactory lockFactory) at Lucene.Net.Store.FSDirectory.SetLockFactory(LockFactory lockFactory) at Lucene.Net.Store.FSDirectory..ctor(DirectoryInfo path, LockFactory lockFactory) at Lucene.Net.Store.MMapDirectory..ctor(DirectoryInfo path, LockFactory lockFactory, Int32 maxChunkSize) at Lucene.Net.Store.MMapDirectory..ctor(DirectoryInfo path, LockFactory lockFactory) at Lucene.Net.Store.MMapDirectory..ctor(DirectoryInfo path) ... Inner Exception 1: FileLoadException: Could not load file or assembly "Microsoft.Extensions.Configuration.Abstractions, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60" or one of its dependencies. The located assembly's manifest definition does not match the assembly referencen. (Exception from HRESULT: 0x80131040) I'm using beta16 and .Net Framework 4.8.1 It happens when I try to open a directory: _IndexPath = FSDirectory.Open(new DirectoryInfo(Path.GetFullPath(Path.Combine(indexRootPath, subDir)))); or _IndexPath = new MMapDirectory(new DirectoryInfo(Path.GetFullPath(Path.Combine(indexRootPath, subDir)))); I tried Version 1.1.2 of Microsoft.Extensions.Configuration.Abstractions and Microsoft.Extensions.Configuration but that didn't help. I use several projects in my solution. I searched for "Microsoft.Extensions.Configuration.Abstractions.dll" and these are all instances that were found: [0] {[D:\TestProgram\Index\IndexSearch\bin\Debug\Microsoft.Extensions.Configuration.Abstractions.dll, {Microsoft.Extensions.Configuration.Abstractions, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60}]} System.Collections.Generic.KeyValuePair<string, System.Reflection.AssemblyName> [1] {[D:\TestProgram\packages\Microsoft.Extensions.Configuration.Abstractions.1.1.2\lib\netstandard1.0\Microsoft.Extensions.Configuration.Abstractions.dll, {Microsoft.Extensions.Configuration.Abstractions, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60}]} System.Collections.Generic.KeyValuePair<string, System.Reflection.AssemblyName> ### Expected Behavior _IndexPath = FSDirectory.Open(new DirectoryInfo(Path.GetFullPath(Path.Combine(indexRootPath, subDir)))); should open the directory instead of producing an exception ### Steps To Reproduce use beta16 and .Net Framework 4.8.1 (also happens with lower versions) try to open a directory: private FSDirectory _IndexPath; _IndexPath = FSDirectory.Open(new DirectoryInfo(Path.GetFullPath(Path.Combine(indexRootPath, subDir)))); or _IndexPath = new MMapDirectory(new DirectoryInfo(Path.GetFullPath(Path.Combine(indexRootPath, subDir)))); ### Exceptions (if any) System.TypeInitializationException HResult=0x80131534 Message=The type initializer for "Lucene.Net.Diagnostics.Debugging" threw an exception. Source=Lucene.Net StackTrace: at Lucene.Net.Store.BaseDirectory.SetLockFactory(LockFactory lockFactory) at Lucene.Net.Store.FSDirectory.SetLockFactory(LockFactory lockFactory) at Lucene.Net.Store.FSDirectory..ctor(DirectoryInfo path, LockFactory lockFactory) at Lucene.Net.Store.MMapDirectory..ctor(DirectoryInfo path, LockFactory lockFactory, Int32 maxChunkSize) at Lucene.Net.Store.MMapDirectory..ctor(DirectoryInfo path, LockFactory lockFactory) at Lucene.Net.Store.MMapDirectory..ctor(DirectoryInfo path) ... Inner Exception 1: FileLoadException: Could not load file or assembly "Microsoft.Extensions.Configuration.Abstractions, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60" or one of its dependencies. The located assembly's manifest definition does not match the assembly referencen. (Exception from HRESULT: 0x80131040) ### Lucene.NET Version Lucene.Net 4.8.0-beta00016 ### .NET Version .Net Framework 4.8.1 (also happens with lower versions) ### Operating System Windows 10 ### Anything else? _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org