I've added NHibernate.Search to my otherwise routine S#arp Architecture 2.0 / MVC3 / .Net 4 project, followed directions pieced together from various tutorials, and it compiles fine, but I get a runtime exception:

Method 'Merge' in type 'NHibernate.Search.Impl.FullTextSessionImpl' from assembly 'NHibernate.Search, Version=2.0.2.4000, Culture=neutral, PublicKeyToken=null' does not have an implementation.

This happens when I try to run var fullTextSession = Search.CreateFullTextSession(this.Session); in a class which inherits SharpArch.NHibernate.NHibernateRepository<T> or IFullTextSession session = Search.CreateFullTextSession(this.Session); in a class based on NHibernateQuery (same namespace).

I have a reference to NHibernate.Search in my project (version 2.0.2.400 added via nuget) and it is set "Copy Local." I have tried using uninstall-package followed by install-package, but it offered no change.

有帮助吗?

解决方案

The official NHibernate.Search repository has not been updated for a long time. You may check this repository on github, it builds against NHibernate 3.2 and a recent version of Lucene.

其他提示

Looking at http://nhcontrib.svn.sourceforge.net/viewvc/nhcontrib/trunk/src/NHibernate.Search/src/NHibernate.Search/NHibernate.Search.csproj?revision=1613&view=markup

It seems that NHibernate.Search is not built with latest NH, only thing I can suggest is to download/update and build yourself

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top