3

Here is my question:

  • I have an application (WPF). It uses A.DLL
  • A.DLL uses a third party DLL (B.DLL)
  • In my application, I want need to use A.DLL. I am not directly referencing anything in B.DLL. But when I go to build the installer, I see that it includes B.DLL.

This becomes troublesome when there are a lot of third party DLL's we need to use. Does an DLL not embed its dependent DLL's or something? Is there no way keep from giving the customer access to these third party DLL's (B.DLL)?

akasoggybunz
  • 344
  • 7
  • 21

2 Answers2

0

Select what you don't want to include.

Right click, change property "Copy Local" to false. enter image description here

Hai Tuong
  • 76
  • 3
-3

Here on MSDN it explains how to add and remove references (.DLL) in your Visual Studio solutions.

To remove a reference in Visual Basic

1.In Solution Explorer, double-click the My Project node for the project.

2.In the Project Designer, click the References tab.

3.In the References list, select the reference you want to remove. Click the Remove button.

To remove a reference in Visual C#

1.In Solution Explorer, open the References node under the project node.

2.Right-click a reference and click Remove.

Solution Reference Right click .dll and remove

akasoggybunz
  • 344
  • 7
  • 21
  • This shows how to remove a reference. This is not what I was asking. My exact situation is that I do not need it in solution explorer because I am not using B.DLL in my project (directly). However, when I run the application it tries to access B.DLL. So I have to add it to the bin folder for it to even run. The point I was getting at, is that what if I am trying to keep from needing to add B.DLL to the output folder? Is there a way to embed B.DLL in A.DLL or something similar? – Brandon Deaton Feb 03 '17 at 16:42
  • @BrandonDeaton , Sorry i misunderstood you question. I thought you were trying to deference a .dll. So your run-time is referencing B.dll? But you don't want B.dll added into the solution? – akasoggybunz Feb 03 '17 at 16:50
  • Correct. I don't want B.DLL in the output folder. (Bin/Debug/) Sometimes We are trying to minimize the number of DLL's we need to keep updated with the projects. For example, Entity Framework requires two DLL's. We built a wrapper for Entity Framework in a library (dll). Now we don't want to include the Entity DLL's. Just the library with the entity wrapper. – Brandon Deaton Feb 03 '17 at 18:45
  • @BrandonDeaton I don't think you can de-reference `B.dll` without decompiling `A.dll `and de-referencing `B.dll` from there. Did you build `A.dll` ? If so open `A.dll` and de-reference `B.dll` the way i show you. If not you will have to de-compile, un-reference, and then recompile `A.dll`. – akasoggybunz Mar 24 '17 at 20:20