A web site I’m working on uses Kentico CMS version 7. Occasionally its search function would break down due to a corrupted Lucene index.
Kentico CMS’s SmartSearch is built on top of Lucene.Net. Kentico 7 comes with Lucene.Net 18.104.22.168, a very old version. One of the things I tried was to upgrade Lucene.Net.
Although the latest version is 3.0.3, I decided to go with 22.214.171.124.
nuget install Lucene.Net -Version 126.96.36.199
Then I replaced Kentico’s Lucene.Net.dll and dependency ICSharpCode.SharpZipLib.dll.
As expected, Kentico throws an error “Could not load file or assembly ‘Lucene.Net, Version=188.8.131.52, Culture=neutral, PublicKeyToken=d846ee227f01c7a1’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference.”
Trying to work around it, I added the following to web.config:
1 2 3 4 5 6 7 8
Unfortunately, it didn’t help. A closer look at the error message shows the exception was thrown by CMS.LicenseProvider.LicenseHelper.