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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T05:16:04+00:00 2026-06-08T05:16:04+00:00

I have a Visual Studio 2010 Solution that contains three projects: A Windows Service

  • 0

I have a Visual Studio 2010 Solution that contains three projects:

  • A Windows Service which will read Data from a SQLite Database to perform actions
  • A Winforms App which will provide a method of configuring the behaviour of the Service (by updating the SQLite Database)
  • A Class Library Project to abstract all database access away from the service and the config app (making it easier in the future to update anything having to do with the database without having to hunt down queries in the other two projects)

All of these projects are in the same solution, and I have added references from the Winforms App and the Service to the class library. In both projects I am able to see the classes from the class library and interact with them, but I am having an issue. I have created the database in the /Resources/ directory of my class library project (because to me the “common” project is the only sensible place to store the common database), however whenever I attempt to access the database in the Winforms app, it is not returning data that I know is in there. Since System.Data.SQLite has the default behaviour of creating an empty database file if the file isn’t found (an odd choice in my opinion), I can’t even go back and tell if the database exists or not.

This leads me to suspect that I am not understanding properly how files from one project are referenced in another. Here is what my project looks like:

Screenshot of the Solution Manager in VS

WorkModeCommon Contains the classes SQLiteDatabase and ScheduleManager, where ScheduleManager has a SQLiteDatabase() and SQLiteDatabase interacts with Resources/WorkModeSchedules.s3db

Both the WorkModeConfigApp and the WorkModeService have a WorkModeCommon.ScheduleManager(), which should in theory take care of all of the database interaction.

Do I have a major flaw in my design, or could someone point me to a resource which could help me solve the problem I’m having?

  • 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-08T05:16:06+00:00Added an answer on June 8, 2026 at 5:16 am

    Ok folks, I’ve solved my problem. What I did is include a copy of the DB file in each project, and set the “Copy To Output Directory” property on all but one of those instances (the “Common” project) to “Do Not Copy”. After that I changed the output directory for all three projects to the same directory (more specifically, I created centralized Debug and Release directories and pointed the proper build configurations to the proper directories). I am now able to test successfully using a single DB file and a centralized class library!

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

Sidebar

Related Questions

I have a Visual Studio 2010 solution that contains multiple projects. One of these
I have a Visual Studio 2010 solution that contains a WCF service project. When
I have a solution in Visual Studio 2010 which contains multiple projects. All of
I have a visual studio 2010 solution that contains 72 projects and most of
I have a Visual Studio 2010 solution that contains 3 projects: a dll project,
We have a Visual Studio 2010 solution that contains several C# projects in accordance
We have a Visual Studio 2010 solution that contains several C# projects in accordance
I have a Visual Studio 2010 solution that contains a class library (ProjectA) and
I have a Visual Studio 2010 solution that contains C# (managed), C++/CLI (unmanaged) and
We have a Visual Studio 2010 solution that has over 120 projects that reference

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.