Partager via


VCCustomBuildTool.CommandLine, propriété

Obtient ou définit une ligne de commande pour l'outil d'événement de build à exécuter.

Espace de noms :  Microsoft.VisualStudio.VCProjectEngine
Assembly :  Microsoft.VisualStudio.VCProjectEngine (dans Microsoft.VisualStudio.VCProjectEngine.dll)

Syntaxe

'Déclaration
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)

Valeur de propriété

Type : String
Ligne de commande pour l'outil d'événement de build à exécuter.

Notes

Pour plus d'informations, consultez Spécification d'événements de build. Consultez Comment : compiler l'exemple de code pour l'extensibilité du modèle de projet pour plus d'informations sur la façon de compiler et exécuter cet exemple.

Exemples

L'exemple suivant modifie la propriété d'CommandLine de l'objet d'VCPreBuildEventTool dans l'environnement de développement intégré (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 VCPostBuildEventTool
        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

Sécurité .NET Framework

Voir aussi

Référence

VCCustomBuildTool Interface

Microsoft.VisualStudio.VCProjectEngine, espace de noms