About the Copy Local in VS

  • Thread starter Thread starter tony
  • Start date Start date
T

tony

Hello!

Is it correct to say as long as you are dealing with project that are
buiding assembly dll it doesn't matter if the field
Copy Local is set to True or if it set to False.

This field Copy Local is a field that is displayed when you use property on
file in the reference part.

//Tony
 
Copy local is a VS feature and has noting to do with the code generated by
the compiler. When a project depends on some other assemblies there are two
ways to deploy referenced assemblies. One is if the assemblies are in the
GAC then the control knows how and where to find them and the other is
privately deployed assemblies where the referenced assemblies must be in the
same folder as the assembly using them or in subfolders as per the probing
logic of the assembly loader.

When you create a dll you cannot run the dll directly it needs to be
referenced by some exectuable, so setting copy local for assemblies
referenced by the dll doesn't make sense. The copy process takes place right
before executing the application. However the project that uses your dll
needs to have copy local set for your dll and any other dlls your dll use.

The bottom line - you are correct this setting does not make sense when
creating dll.
 
Back
Top