When adding a reference in a VS2008 C# form project, does Visual Studio copy the referenced assembly

StackOverflow https://stackoverflow.com/questions/1098409

  •  11-09-2019
  •  | 
  •  

Question

into the project directory? Or does it simply reference the dll where it exists?

My assumption was that when you compile, it copies to dll into the local bin/debug(release) directory.

I am running into some issues with a project at work involving missing third party component dll's and I am a little confused, so I'm not sure how to proceed.

Thanks, Kevin

Was it helpful?

Solution

By Default, If it is in the GAC, then it will not copy the assembly locally. If it is anywhere else, it will.

If you have any doubt, look under your references list and go to the properties of the assembly in question. There is a "Copy Local" property. If you change that property, it should copy to your output project. Redo your packaging and deploy.

OTHER TIPS

A reference has a property named 'Copy Local'. If this is set to true then the assembly will be copied to the output folder.

It'll copy it if you tell it to in the properties for the reference. Indirect references (i.e. when a third party control needs yet another 3rd party control that isn't referenced) won't be, but I think you get a compiler warning if that is the case.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top