今天在asp.net core项目中使用.net结巴分词报错:The type initializer for 'JiebaNet.Segmenter.JiebaSegmenter' threw an exception.
断点发现,InnerException为:"Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. 系统找不到指定的文件。"
提示已经很明显,用NuGet添加System.Configuration.ConfigurationManager即可.如图:
以上就是【结巴分词 The type initializer for 'JiebaNet.Segmenter.JiebaSegmenter' threw an exception.】的全部内容了,欢迎留言评论进行交流!