Condividi tramite


Proprietà VCPreBuildEventTool.CommandLine

Ottiene o imposta una riga di comando per lo strumento evento di compilazione.

Spazio dei nomi:  Microsoft.VisualStudio.VCProjectEngine
Assembly:  Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)

Sintassi

'Dichiarazione
Property CommandLine As String
string CommandLine { get; set; }
property String^ CommandLine {
    String^ get ();
    void set (String^ value);
}
abstract CommandLine : string with get, set
function get CommandLine () : String
function set CommandLine (value : String)

Valore proprietà

Tipo: System.String
Una riga di comando per lo strumento evento di compilazione.

Note

Per ulteriori informazioni, vedere Specifica di eventi di compilazione.

Esempi

vedere Procedura: compilare codice di esempio per l'Extensibility del modello di progetto per informazioni su come compilare ed eseguire l'esempio.

Nell'esempio seguente viene modificato VCPreBuildEventTool oggetto CommandLine proprietà nell'ambiente di sviluppo (IDE) integrato (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 VCPreBuildEventTool
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        cfg = cfgs.Item(1)
        tool = cfg.Tools("VCPreBuildEventTool")
        tool.CommandLine = "your command"
    End Sub
End Module

Sicurezza di .NET Framework

Vedere anche

Riferimenti

VCPreBuildEventTool Interfaccia

Spazio dei nomi Microsoft.VisualStudio.VCProjectEngine