I am using w7, 64bit and vs.net 2010.
I am adding a reference to a component that is within my 'add references' dialog box. The component is a 3rd party dll.
Historically, on w7 32bit it would add a line in my web.config (within the assemblies tag) referencing this dll and it wouldn't copy the dll to the bin directory.
However, on 64bit w7 the dll is copied to the bin directory and the web.config is not updated at all.
Why is the dll being copied to the bin directory? thanks
Solution: (Updated) These posts gave me the clues I needed.
VS.NET will copy the dll to the bin directory if your system cannot find the dll in the GAC. Assemblies in the GAC (registered on your workstation) and can be found by looking at C:\Windows\Assembly directory.
Components listed in vs.net ‘add references dialog’ may or may not be in the gac. Because the component is listed in the ‘add references’ dialog doesn't imply it is registered on your local workstation. I navigated to the component directory and dragged the desired dll’s to the C:\Windows\Assembly directory. I closed and re-opened vs.net and browsed to the same file(s) and clicked add reference.
**This added the assembly reference to my web.config (and it also didn’t copy the dll to my web site bin directory)****
It gets copies to the bin directory so that the executable can find it. It won't find it otherwise, unless the dll is installed in the GAC.
Additionally to previous responses : I think that Visual Studio determines if the
Copy Local
property is set to true based on the fact that the DLL is not in your computer GAC.It prevents the VS to copy the native .net DLLs, so it should by default only copy "custom" DLLs.
On the reference, there is a Copy Local property (in the Properties window), which determines whether the assembly should be copied to the output directory.
As to why that might not have mattered for other references, MSDN says: