Hello All,
I have an odd problem. I have a number of C# apps that utilize Nhibernate 2.1. Within the last 2 days I've begun receiving the following error:
Could not load file or assembly 'NHibernate, Version=3.0.0.1001, Culture=neutral,
PublicKeyToken=aa95f207798dfdb4' or one of its dependencies. The located assembly's
manifest definition does not match the assembly reference. (Exception from HRESULT:
0x80131040)
I cannot for the life of me locate the cause of this problem, I've not updated my reference assemblies and the correct v2.1 .dll's are where they should be. I've cleaned the solution entirely and recompiled and I'm convinced it is not a mapping issue as known-working objects now fail to retrieve. Regardless below are my object and mapping.
using System;
using System.IO;
using System.Collections.Generic;
namespace Epn.Assembly.Domain
{
public class Email
{
public int EmailId { get; set; }
public string Sender { get; set; }
public string Recipient { get; set; }
public string CC { get; set; }
public string BCC { get; set; }
public string Subject { get; set; }
public string Body { get; set; }
public string EmailType { get; set; }
public Nullable<DateTime> SentDateTime { get; set; }
public string ErrorMessage { get; set; }
public DateTime QueueDateTime { get; set; }
public DateTime LastActivityDateTime { get; set; }
public bool HoldForReview { get; set; }
}
}
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" schema="SystemStatusDb.dbo" auto-import="true" assembly="EpnDomain" namespace="Epn.Assembly.Domain">
<class name="Epn.Assembly.Domain.Email, EpnDomain" lazy="false" table="EpnEmails">
<id name="EmailId" column="EmailId">
<generator class="native" />
</id>
<property name="Sender" column="Sender"/>
<property name="Recipient" column="Recipient" />
<property name="CC" column="CC" />
<property name="BCC" column="BCC" />
<property name="Subject" column="Subject" />
<property name="Body" column="Body" />
<property name="EmailType" column="EmailType" />
<property name="SentDateTime" column="SentDateTime" />
<property name="ErrorMessage" column="ErrorMessage" />
<property name="QueueDateTime" column="QueueDateTime" />
<property name="LastActivityDateTime" column="LastActivityDateTime" />
<property name="HoldForReview" column="HoldForReview" />
</class>
</hibernate-mapping>