Freigeben über


Reference2.CopyLocal Property

Determines whether the reference is copied to the local bin path.

Namespace:  VSLangProj2
Assembly:  VSLangProj2 (in VSLangProj2.dll)

Syntax

'Declaration
Property CopyLocal As Boolean
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: 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 the value is 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 the CopyLocal property is determined in the following order:

  1. If the reference is another project, called a project-to-project reference, then the value is true.

  2. If the assembly is found in the global assembly cache, the value is false.

  3. As a special case, the value for the mscorlib.dll reference is false.

  4. If the assembly is found in the Framework SDK folder, then the value is false.

  5. Otherwise, the value is true.

.NET Framework Security

See Also

Reference

Reference2 Interface

VSLangProj2 Namespace