Could not load file or assembly 'FluentNHibernate, Version = 2.0.3.0 ...'

1,194 views
Skip to first unread message

Nathaniel Angeles

unread,
Feb 17, 2016, 6:45:03 AM2/17/16
to Fluent NHibernate
The error message i get is: 

"Could not load file or assembly 'FluentNHibernate, version=2.0.3.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

I got this code in my app.config:

<runtime>
   <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Iesi.Collections" publicKeyToken="aa95f207798dfdb4" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.4000" />
      </dependentAssembly>
      <dependentAssembly>
      <assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.0.4000" newVersion="4.0.0.4000" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="FluentNHibernate" publicKeyToken="8aa435e3cb308880" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="2.0.3.0" />
      </dependentAssembly>
   </assemblyBinding>
</runtime>

any ideas how to fix this?

Gleb Chermennov

unread,
Feb 18, 2016, 4:55:58 AM2/18/16
to Fluent NHibernate
Try redirecting to oldVersion="0.0.0.0-2.0.3.0" of Fluent NHibernate.

среда, 17 февраля 2016 г., 14:45:03 UTC+3 пользователь Nathaniel Angeles написал:

Nathaniel Angeles

unread,
Feb 18, 2016, 9:24:05 AM2/18/16
to Fluent NHibernate
still no luck. although it seems that the problem is on binding redirect newVersion. Such that if i changed the new version to 2.0.2.0. the error changes to "Could not load file or assembly 'FluentNHibernate, version=2.0.2.0, ..."

If it helps i have the latest version ofNhibernate, Iesi.Collections, and fluentNHibernate installed via Nuget. Below is the message i see when in Package Manager Console:


PM> Install-Package FluentNHibernate
Attempting to resolve dependency 'NHibernate (≥ 4.0)'.
Attempting to resolve dependency 'Iesi.Collections (≥ 4.0 && < 5.0)'.
'FluentNHibernate 2.0.3.0' already installed.
OmsClient already has a reference to 'FluentNHibernate 2.0.3.0'.

Advanced thanks to anyone who can help =)

Nathaniel Angeles

unread,
Feb 18, 2016, 9:42:22 AM2/18/16
to Fluent NHibernate
nvm. stupid me! The references were wrong for the data access layer and the business layer. I just corrected the references and it works!. thanks Gleb for trying :)

Gleb Chermennov

unread,
Feb 18, 2016, 9:50:49 AM2/18/16
to fluent-n...@googlegroups.com
Dont worry, we've all been there

2016-02-18 17:42 GMT+03:00 Nathaniel Angeles <nathanie...@gmail.com>:
nvm. stupid me! The references were wrong for the data access layer and the business layer. I just corrected the references and it works!. thanks Gleb for trying :)

--
You received this message because you are subscribed to a topic in the Google Groups "Fluent NHibernate" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/fluent-nhibernate/xD3H4-DEuzU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to fluent-nhibern...@googlegroups.com.
To post to this group, send email to fluent-n...@googlegroups.com.
Visit this group at https://groups.google.com/group/fluent-nhibernate.
For more options, visit https://groups.google.com/d/optout.



--
Yours faithfully, 
Gleb
Reply all
Reply to author
Forward
0 new messages