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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:31:13+00:00 2026-05-14T15:31:13+00:00

Problem: SQLite assembly referenced in my DAL assembly does not get copied to the

  • 0

Problem: SQLite assembly referenced in my DAL assembly does not get copied to the output folder when doing unit tests (Copy local is set to true).

I am working on a .Net 3.5 app in VS2008, with NHibernate & SQLite in my DAL. Data access is exposed through the IRepository interface (repository factory) to other layers, so there is no need to reference NHibernate or the System.Data.SQLite assemblies in other layers.

For unit testing, there is a public factory method (also in my DAL) which creates an in-memory SQLite session and creates a new IRepository implementation. This is also done to avoid have a shared SQLite in-memory config for all assemblies which need it, and to avoid referencing those DAL internal assemblies.

The problem is when I run unit tests which reside a separate project – if I don’t add System.Data.SQLite as a reference to the unit test project, it doesn’t get copied to the TestResults…\Out folder (although this project references my DAL project, which references System.Data.SQLite, which has its Copy local property set to true), so the tests fail while NHibernate is being configured. If I add the reference to my testing project, then it does get copied and unit tests work.

What am I doing wrong?

[Update]

It seems I’ve found the answer here: TFS UnitTesting not deploying local copy assembly to test dir when on build server. If I add a reference to that type in some static method in my DAL, it will get copied automatically when I reference the DAL assembly in my tests. This does seem like a hack but IMHO is a cleaner solution than having a separate script since it creates a “real” dependency.

It seems that it also gets copied if I add the SQLite assembly as an additional deployment item to my test run configuration (LocalTestRun.testrunconfig file).

Thanks for your quick answers!

  • 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-14T15:31:13+00:00Added an answer on May 14, 2026 at 3:31 pm

    Your DAL project references the System.Data.SQLite assembly but this doesn’t mean it will get copied to the output folder of the test project especially if it is loaded using reflection by NHibernate. Chances are if you look at the compiled DAL assembly with reflector it doesn’t even have it in the referenced assemblies list as it is not used directly by the code. You’ve already found the solution by referencing it to the unit test project.

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

Sidebar

Ask A Question

Stats

  • Questions 516k
  • Answers 516k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You could set all the values into the response object… May 16, 2026 at 6:56 pm
  • Editorial Team
    Editorial Team added an answer Do you want to change the name of your xcode… May 16, 2026 at 6:56 pm
  • Editorial Team
    Editorial Team added an answer It was a filesystem problem on the server. It was… May 16, 2026 at 6:56 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I can't get SQLite Driver working in my sessionfactory. I downloaded SQLite 1.0.48 from
After converting to Visual Studio 2010 with ReSharper5 some of my unit tests started
i have a problem in sqlite database connected with iphone sdk for eg. when
I used NHibernate 2.1.2, FluentNhibernate 1.1, and SQLite configured with In Memory (For unit
Okay, here is my problem... I created a Data Layer using the RTM Fluent
Today I use SQLite and send a database-file with the project. However I want
I have a component that i want to store to an SQLite database. public
I have a SQLite DB that I'm using to store app data, and I
I am copying a SQLite file to the Documents directory of my iPhone/Simulator. First
I am creating a SQLite database from qt like this: QSqlDatabase db = QSqlDatabase::addDatabase(QSQLITE,

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.