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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:37:27+00:00 2026-06-02T18:37:27+00:00

I have a C# library which has System.Data.SQLite as a reference, and an executable

  • 0

I have a C# library which has System.Data.SQLite as a reference, and an executable (as a 2nd project) which uses the library.

In the library, I have a function which references a class in System.Data.SQLite (Specifically the SQLiteDataReader class):

public static IEnumerable<T> SQLiteFetch<T>(Func<SQLiteDataReader, T> formator, string connectionString, string query)

The library compiles properly, but not the executable which calls this function.

This comes up as an error on build, saying I “must add a reference to assembly ‘System.Data.SQLite'”. I get that it’s due to the IEnumerable, but why isn’t the reference forwarded through my library? Do I really have to add a reference to System.Data.SQLite in my executable as well?

  • 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-02T18:37:28+00:00Added an answer on June 2, 2026 at 6:37 pm

    Yes, you have to add a reference to your executable because when you are creating your formator, .NET expects it to be of type Func<SQLiteDataReader, T>. And since your executable doesn’t have a reference to System.Data.SQLite, it doesn’t know how to deal with your formator. This is the case even if you pass null as the formator.

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

Sidebar

Related Questions

I have a library which has a basic class which is used extensively by
We have a class library (ProjA) which has L2E object context. This will be
I have existing Linux shared object file (shared library) which has been stripped. I
I have a document library in MOSS 2007 which has folders and files. Document
I have a c-library which I use in gcc. The library has the extension
If i have a library which is compiled in .NET 4 and reference it
I have kind of library which uses a bunch of its own perf counters.
I have a library project which includes a object (.o) file. I have the
well i am working for PocketPc and it has a library ( System.data )
my friend has made a really helpful class library which I use all the

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.