我正在尝试在我的 Asp.Net Core 2.0 项目上实现“Lucene 搜索”。
var dir = FSDirectory.Open(new DirectoryInfo(@"C:/test_lucene"));
我遇到了错误
"The type initializer for 'Lucene.Net.Store.FSDirectory' threw an exception and File not Found Exception".
在 Asp 上。 Net Framework 它没有给出任何错误。
在 Asp.Net Core 中有其他选择吗?
最佳答案
您需要将 nuget 包 System.Configuration.ConfigurationManager 安装到您的项目中。
关于c# - 'Lucene.Net.Store.FSDirectory' 的类型初始值设定项抛出异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51820311/