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 685437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:55:21+00:00 2026-05-14T01:55:21+00:00

Okay, here is my problem… I created a Data Layer using the RTM Fluent

  • 0

Okay, here is my problem…

I created a Data Layer using the RTM Fluent Nhibernate. My create session code looks like this:

_session = Fluently.Configure().
Database(SQLiteConfiguration.Standard.UsingFile("Data.s3db"))                   
                        .Mappings( m =>
                        {
                         m.FluentMappings.AddFromAssemblyOf<ProductMap>();
                         m.FluentMappings.AddFromAssemblyOf<ProductLogMap>();
                        })
                        .ExposeConfiguration(BuildSchema)
                        .BuildSessionFactory();

When I reference the module in a test project, then create a test fixture that looks something like this:

    [Test]
    public void CanAddProduct()
    {
        var product = new Product {Code = "9", Name = "Test 9"};
        IProductRepository repository = new ProductRepository();

        repository.AddProduct(product);

        using (ISession session = OrmHelper.OpenSession())
        {
            var fromDb = session.Get<Product>(product.Id);

            Assert.IsNotNull(fromDb);
            Assert.AreNotSame(fromDb, product);
            Assert.AreEqual(fromDb.Id, product.Id);
        }

My tests pass. When I open up the created SQLite DB, the new Product with Code 9 is in it. the tables for Product and ProductLog are there.

Now, when I create a new console application, and reference the same library, do something like this:

        Product product = new Product() {Code = "10", Name = "Hello"};
        IProductRepository repository = new ProductRepository();
        repository.AddProduct(product);

        Console.WriteLine(product.Id);

        Console.ReadLine();

It doesn’t work. I actually get pretty nasty exception chain. To save you lots of head aches, here is the summary:

Top Level exception:

An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.\r\n\r\n

The PotentialReasons collection is empty

The Inner exception:

The IDbCommand and IDbConnection implementation in the assembly System.Data.SQLite could not be found. Ensure that the assembly System.Data.SQLite is located in the application directory or in the Global Assembly Cache. If the assembly is in the GAC, use element in the application configuration file to specify the full name of the assembly.

Both the unit test library and the console application reference the exact same version of System.Data.SQLite. Both projects have the exact same DLLs in the debug folder. I even tried copying SQLite DB the unit test library created into the debug directory of the console app, and removed the build schema lines and it still fails

If anyone can help me figure out why this won’t work outside of my unit tests it would be greatly appreciated. This crazy bug has me at a stand still.

  • 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-05-14T01:55:21+00:00Added an answer on May 14, 2026 at 1:55 am

    If you are on a 64x OS, try setting the compiler build option to x86.

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

Sidebar

Related Questions

Okay, here's my problem: I'm using WatiN to navigate a website, but then a
Here is the problem... I am using CA Tiled Layer to display a large
Strange enough problem... Okay, here's my situation. In my Android application I'm using 3rd
Okay, so here's my problem: We use FOP for creating pretty report output. We
Okay, so here's my problem: I have a list of members on a website,
Okay, so, here's what the problem is. I'm creating a flash site with each
I have a problem with (for me to complicated) MySql query. Okay, here is
Okay, here is my problem: Im implementing an algorithm in Java and part of
Okay, here is the problem. I have an unordered list with a bunch of
Okay so here is the problem I am having. I have several unit tests

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.