copy local default to "false"

Category: c# ide


drew_p on Wed, 28 Jun 2006 16:40:15

Currently when I add assembly which is created by us  to project through "add reference" dialog default "copy local " property for added assembly is "True".

  Is there any way it is possible, when I add assebly in project ,it has default "copy local " property "False" ??




agrt on Thu, 29 Jun 2006 00:41:21

The CopyLocal property doesn't just default to true.  Its value is determined based on the state of the reference.  It is evaluated in this order:

  • if reference = project --> true
  • if reference in GAC --> false
  • if reference is mscorlib.dll --> false
  • if reference is in Framework SDK folder --> false
  • otherwise --> true

You could probably do something through a macro, but that would seem to be more trouble than its worth.  I'm sorry that I don't have a better answer.

Rob Alekel on Mon, 19 Nov 2007 15:24:24

Is this information stored in a file for the solution or project so that a script could modify the file directly and change all reference copy-local properties?

Jan Van der Haegen on Wed, 11 Jul 2012 02:35:52

Call me a necrobumper, but 6 years later I'm still running into the same problem and still don't have a solution.  That's why I created this nuget package to help me out