Share via


VCLinkerTool.OptimizeReferences (Propiedad)

Permite la eliminación de funciones o datos a los que nunca se hace referencia.

Espacio de nombres:  Microsoft.VisualStudio.VCProjectEngine
Ensamblado:  Microsoft.VisualStudio.VCProjectEngine (en Microsoft.VisualStudio.VCProjectEngine.dll)

Sintaxis

'Declaración
Property OptimizeReferences As optRefType
optRefType OptimizeReferences { get; set; }
property optRefType OptimizeReferences {
    optRefType get ();
    void set (optRefType value);
}
abstract OptimizeReferences : optRefType with get, set
function get OptimizeReferences () : optRefType 
function set OptimizeReferences (value : optRefType)

Valor de propiedad

Tipo: Microsoft.VisualStudio.VCProjectEngine.optRefType
Enumeración optRefType.

Comentarios

OptimizeReferences expone la funcionalidad de la opción /OPT (Optimizaciones) del vinculador.

Utilice la enumeración optRefType para cambiar el valor de esta propiedad.

Vea Cómo: Compilar el código de ejemplo de extensibilidad del modelo de proyecto para obtener información sobre cómo compilar y ejecutar este ejemplo.

Ejemplos

En el ejemplo siguiente se modifica la propiedad OptimizeReferences en el entorno de desarrollo integrado (IDE):

' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
  Sub Test()
    Dim prj As VCProject
    Dim cfgs, tools As IVCCollection
    Dim cfg As VCConfiguration
    Dim tool As VCLinkerTool
    prj = DTE.Solution.Projects.Item(1).Object
    cfgs = prj.Configurations
    cfg = cfgs.Item(1)
    tool = cfg.Tools("VCLinkerTool")
    tool.OptimizeReferences = optRefType.optReferences
  End Sub
End Module

Seguridad de .NET Framework

Vea también

Referencia

VCLinkerTool Interfaz

Microsoft.VisualStudio.VCProjectEngine (Espacio de nombres)