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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:58:58+00:00 2026-06-04T06:58:58+00:00

I have a reference to System.Data in my windows service project. I keep getting

  • 0

I have a reference to System.Data in my windows service project. I keep getting the Exception :

Could not load file or assembly ‘System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ or one of its dependencies. The system cannot find the file specified.

I attach the FusionLog to my code and found out the following. For System.Data only visual studio is looking here:

Assembly manager loaded from: C:\windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll

And it should be looking here (all the other assemblies are but System.Data)

Assembly manager loaded from: C:\windows\Microsoft.NET\Framework\v4.0.30319\clr.dll

How can I do point my System.Data file to look in the right place?

My guess is Microsoft Commerce Server dlls are referenceing the 2.0 folder maybe.

  • 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-04T06:58:59+00:00Added an answer on June 4, 2026 at 6:58 am

    Add this to app.config..

      <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
      </startup>
    

    If you need old versions of dlls to be loaded in a windows service you must add this. For web services iis automatically takes care of it, but not for windows service.

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

Sidebar

Related Questions

In our web site project we need to reference the assembly System.Data.DataSetExtensions, 4.0.0.0. So
On the class level, I have created reference: System::Data::Odbc::OdbcConnection Connection; in some method I
I have a program which doesn't once reference System.I0, coded in vb.net, yet for
I can't find [WebInvoke] and [WebGet] . I have already add System.ServiceModel reference. what
I have a reference to call that may or may not be there. When
i have the following code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using
I have Windows Server 2008 R2 with IIS7 on it. I deployed WCF service
im getting the Object reference not set to an instance of an object for
I have a WCF service that is called by a Windows Mobile application running
I have a reference application that I use to work through DDD issues, and

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.