NightOwl888 commented on issue #311:
URL: https://github.com/apache/lucenenet/issues/311#issuecomment-1821399607

   Unless you are seeing the same exception, this is probably due to a 
versioning conflict between Lucene.NET's reference to this package and another 
library's reference to it. Please review the output of each of your projects 
and pay close attention to the version of all 
Microsoft.Extensions.Configuration libraries in each `bin` folder. If it is not 
consistently outputting the same version for each of your projects, you may 
need to add a reference to the offending package in order to explicitly force a 
version upgrade (assuming the conflict is not due to something you own).
   
   Here is a simple console app to automate the process of checking for 
conflicts that you can adjust to check your projects.
   
   ```c#
               // Build the project in debug mode before running
   
               var configuration = "Release";
               var targetFramework = "net461";
               var fileToFind = 
"Microsoft.Extensions.Configuration.Abstractions.dll";
               var baseFolder = @"<path to the root of your source code>";
   
               foreach (string file in Directory.EnumerateFiles(baseFolder, 
"*.dll", SearchOption.AllDirectories)
                   .Where(f => 
Path.GetDirectoryName(f).EndsWith(@$"bin\{configuration}\{targetFramework}")))
               {
                   if (Path.GetFileName(file) == fileToFind)
                   {
                       var assemblyName = AssemblyName.GetAssemblyName(file);
   
                       Console.WriteLine(assemblyName.ToString() + " - " + 
file);
                   }
               }
   ```
   
   If you square up your references and still see an exception, please open a 
new bug report with a repro project.


-- 
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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to