Link to home
Start Free TrialLog in
Avatar of stucal
stucal

asked on

Unable to find assembly 'Lucene.Net, Version=3.0.3.0,

Hello,

We are getting this error on a dnn aspx .net site, any ideas how to rectify, the version is correct in the bin directory of the site.

An unhandled exception occurred and the process was terminated.

Application ID: DefaultDomain

Process ID: 4208

Exception: System.Runtime.Serialization.SerializationException

Message: Unable to find assembly 'Lucene.Net, Version=3.0.3.0, Culture=neutral, PublicKeyToken=85089178b9ac3181'.

StackTrace:    at System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name)
   at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
   at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
   at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.AppDomain.Deserialize(Byte[] blob)
   at System.AppDomain.UnmarshalObject(Byte[] blob)
 


thanks

stu
Avatar of Miguel Oz
Miguel Oz
Flag of Australia image

Check your web.config file if this assembly has an entry and this entry contains the correct version.
If more help needed, please post the relevant entry to this assembly in web.config file.
The version is not the only thing identifies a dll. Its signature (PublicKeyToken=85089178b9ac3181) must also match.

You can retrieve the public key from the dll with the sn utility available through a Visual Studio command prompt, with the -e flag:

SN -e Lucene.Net

The result must match the PublicKeyToken=85089178b9ac3181. If not then .NET does not recognize that assembly as the one that was used during development.

This can be malware, or simply that the programmers that designed the assembly do not know much about signatures and changed the signature at some point.
Avatar of stucal
stucal

ASKER

Hi Guys,

Nothing in the web.config, and on the command window in vs 2008 I get 'command sn is not valid'
I will suggest get a new copy and added to your project.
1) Make a backup of the current assembly.
2) Delete and download the assembly from here. Ideally you would like to use Nuget.
3) Add it to your project as a reference if you do not have NUget.
sn does not come automatically with the standard Command prompt, that is not configured to find the tools used by .NET and Visual Studio.

You need to use the Command prompt provided with Visual Studio, that you will find in the Visual Studio section of the Windows Start menu.
ASKER CERTIFIED SOLUTION
Avatar of stucal
stucal

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of stucal

ASKER

rebuild of site on new bas worked