VCCLCompilerTool.CompileAs (Propiedad)
Selecciona la opción de lenguaje de compilación para los archivos .C y .CPP. CompileAs expone la funcionalidad de las opciones /Tc, /Tp, /TC, /TP (Especificar el tipo de archivo de código fuente) del compilador.
Espacio de nombres: Microsoft.VisualStudio.VCProjectEngine
Ensamblado: Microsoft.VisualStudio.VCProjectEngine (en Microsoft.VisualStudio.VCProjectEngine.dll)
Sintaxis
'Declaración
Property CompileAs As CompileAsOptions
CompileAsOptions CompileAs { get; set; }
property CompileAsOptions CompileAs {
CompileAsOptions get ();
void set (CompileAsOptions value);
}
abstract CompileAs : CompileAsOptions with get, set
function get CompileAs () : CompileAsOptions
function set CompileAs (value : CompileAsOptions)
Valor de propiedad
Tipo: Microsoft.VisualStudio.VCProjectEngine.CompileAsOptions
Enumeración CompileAsOptions.
Ejemplos
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.
En el ejemplo siguiente se modifica la propiedad CompileAs 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 VCCLCompilerTool
prj = DTE.Solution.Projects.Item(1).Object
cfgs = prj.Configurations
cfg = cfgs.Item(1)
tool = cfg.Tools("VCCLCompilerTool")
tool.CompileAs = CompileAsOptions.compileAsC
End Sub
End Module
Seguridad de .NET Framework
- Plena confianza para el llamador inmediato. Un código de confianza parcial no puede utilizar este miembro. Para obtener más información, vea Utilizar bibliotecas de código que no es de plena confianza.