Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8456589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:34:57+00:00 2026-06-10T12:34:57+00:00

I try to make some unit tests with NUnit for a simple NHibernate Mapping,

  • 0

I try to make some unit tests with NUnit for a simple NHibernate Mapping, with an InMemory SqLite Database.
The SqLite is referenced in my Unit Test Project and NHibernate is referenced by both projects in the same version by Nuget.

My Test looks like

[Test]
    public void AddDocumentTest()
    {
        var document = new Repository<Document>(Session);
        document.Add(new Document { FileName = "Blubb", Id = Guid.NewGuid(), Title = "Dummy Title" });
        // here comes the error            
        var i = document.All().Count();
    }

When I call some Linq Methods on the document class I get

System.IO.FileLoadException : Die Datei oder Assembly “NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4” oder eine Abhängigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assembly stimmt nicht mit dem Assemblyverweis überein. (Ausnahme von HRESULT: 0x80131040)

Sorry I have this only in german but I think its clear what happens.
Why does he look for a complete different Version of NHibernate? (my version is 3.3.1.4000)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T12:34:59+00:00Added an answer on June 10, 2026 at 12:34 pm

    The problem was that I have also a reference to the NHibernate2Linq project which tries to get Nhibernate in an old version.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to make some simple file recovery software, where I want to try
I'm writing a unit test for some simple methods. The issue I am having
I try to make a displaying list with onmouseover() with some links but they
We have some unit tests which compile and run fine in Eclipse 3.4, but
I'm writing many unit tests in VS 2010 with Microsoft Test. In each test
I have been having some problems with the test debugger in VS10. All tests
I have make Some Differential Backup for a Database, which will take the Backup
I have some unit tests which exercise code which makes calls out to a
I'm trying to write some code to help unit test WCF services. These services
I'm having some troubles getting my unit tests to be setup to use an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.