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

  • Home
  • SEARCH
  • 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 6729821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:20:08+00:00 2026-05-26T10:20:08+00:00

Possible Duplicate: How does Copy-local work? I have following situation: there’s a project named

  • 0

Possible Duplicate:
How does Copy-local work?

I have following situation:

  • there’s a project named OLAF.Tools, and that project references Microsoft.Data.SqlXml in C:\Program Files\SQLXML 4.0\bin\Microsoft.Data.SqlXml.dll. Reference Copy Local property is set to True. When I build that project in bin directory I can see both OLAF.Tools.dll and Microsoft.Data.SqlXml.dll
  • there’s a console application named OLAF.Generator, and that application references OLAF.Tools (I’ve added reference using Project tab). When I build that application in bin directory I can see only OLAF.Generator.exe and OLAF.Tools.dll – there’s no Microsoft.Data.SqlXml.dll, what supprises me. Another wierd thing is that even though that dll is missing application is executing properly.

So my questions are:

  • why Microsoft.Data.SqlXml.dll is not copied to bin folder of OLAF.Generator console application?
  • how application resolves directory where Microsoft.Data.SqlXml.dll can be found?

Thanks,Pawel

EDIT 1: (after response from Marc Gravell)

@Marc Gravell: Your answer gave me food for thought, as I could swore that I could always see indirectly dependant assemblies in main application’s bin directory. And IMHO I don’t agree with you – with all due respect 🙂

Of course, references are not cascaded physically (we’re are talking about strong relationship to classes, interfaces etc) – and it’s exactly what I wanted to achieve when building OLAF.Tools library. That library provides a level of abstraction, it contains factories, and one factory accepts as a parameter string and returns interface. One particular implementation of that interface uses Microsoft.Data.SqlXml components. As a result,
OLAF.Generator uses interface that is located in OLAF.Tools, but doesn’t know about components in Microsoft.Data.SqlXml.

Apart from that (I think we both know what I tried to explain in preceding paragraph), when building application, dependant assemblies should be copied (if Copy Local is set to TRUE). I just wrote sample application, Project B lib has reference to Project A lib, and Project C (console app) has reference to Project B. In Project C’s bin directory I can see all: Project A.dll, Project B.dll & Project C.exe. So in discussed scenario, the reason why Microsoft.Data.SqlXml doesn’t end up in OLAF.Generator bin folder has something to do with that assembly itself.

Does compiler/visual studio knows that Microsoft.Data.SqlXml is located in directory which is automatically probed (or it’s in GAC) and this is the reason why that assembly is not copied?

EDIT 2: I’ve just checked GAC, and indeed, Microsoft.Data.SqlXml.dll is installed in GAC.

  • 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-26T10:20:09+00:00Added an answer on May 26, 2026 at 10:20 am

    How does Copy-local work? log4net.dll is not being copied to MyProject output directory – this is answer to my question. When library is installed in GAC, it won’t be copied even though COPY LOCAL setting is used.

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

Sidebar

Related Questions

Possible Duplicate: How does the Google Did you mean? Algorithm work? Suppose you have
Possible Duplicate: Does a exception with just a raise have any use? Is there
Possible Duplicate: question about copy constructor if I have this snippet of the code
Possible Duplicate: Does SQL Server 2005 have an equivalent to MySql’s ENUM data type?
Possible Duplicate: What does <if name ==“ main ”:> do? I have wrote scripts
Possible Duplicate: What does const mean following a function/method signature? Go ahead laugh at
Possible Duplicate: Does adding [Serializable] to the class have any performance implications? What is
Possible Duplicate: How does an interpreter/compiler work Hi what is the exact difference between
Possible Duplicate: Does std::list::remove method call destructor of each removed element? I have a
Possible Duplicate: Does <STYLE> have to be in the <HEAD> of an HTML document?

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.