Reference.CopyLocal Property
Determines whether the reference is copied to the local bin path.
Namespace: VSLangProj
Assembly: VSLangProj (in VSLangProj.dll)
Syntax
'Declaration
Property CopyLocal As Boolean
Get
Set
bool CopyLocal { get; set; }
property bool CopyLocal {
bool get ();
void set (bool value);
}
abstract CopyLocal : bool with get, set
function get CopyLocal () : boolean
function set CopyLocal (value : boolean)
Property Value
Type: System.Boolean
Boolean.
Remarks
At run time, assemblies must be in one of two locations: the output path of the project or the global assembly cache (see Working with Assemblies and the Global Assembly Cache). If the project contains a reference to an object that is not in one of these locations, then when the project is built, the reference must be copied to the output path of the project. The CopyLocal property indicates whether this copy needs to be made. If the value is true, the reference is copied to the output path of the project at run time. If false, the reference is not copied.
The common language runtime does not track the changes to the reference to determine if the local copy needs to be updated. Changes are tracked by the project system. As long as the user has not overridden the CopyLocal property, the value will be automatically updated by the project system if needed.
The project-assigned value of CopyLocal is determined in the following order:
If the reference is another project, called a project-to-project reference, then the value is true.
If the assembly is found in the global assembly cache, the value is false.
As a special case, the value for the mscorlib.dll reference is false.
If the assembly is found in the Framework SDK folder, then the value is false.
Otherwise, the value is true.
Examples
See the example in Reference.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.