Condividi tramite


Metodo VCProjectEngineObjectClass.LoadProject

carica un progetto.

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

Sintassi

'Dichiarazione
Public Overridable Function LoadProject ( _
    projectName As String _
) As Object
public virtual Object LoadProject(
    string projectName
)
public:
virtual Object^ LoadProject(
    [InAttribute] String^ projectName
)
abstract LoadProject : 
        projectName:string -> Object 
override LoadProject : 
        projectName:string -> Object 
public function LoadProject(
    projectName : String
) : Object

Parametri

  • projectName
    Tipo: System.String
    obbligatorio.Il nome del progetto.

Valore restituito

Tipo: System.Object
In VCProject oggetto.

Implementa

VCProjectEngine.LoadProject(String)

Note

Non creare un'istanza VCProjectEngineObjectClass.Creare istanze VCProjectEngineObject invece, come illustrato di seguito:

Dim Engine As VCProjectEngine
Engine = New VCProjectEngineObject()

Esempi

' compile with /reference:Microsoft.VisualStudio.VCProjectEngine.dll
Option Strict Off
Imports Microsoft.VisualStudio.VCProjectEngine

Module Module1
Sub Main()
Dim Engine As VCProjectEngine
Dim Proj As VCProject
Dim Configs, Tools As IVCCollection
Dim Config As VCConfiguration
Dim LinkerTool As VCLinkerTool

Engine = New VCProjectEngineObject()
Proj = Engine.LoadProject("xx.vcproj")

Configs = Proj.Configurations
Config = Configs.Item(1)
Tools = Config.Tools

LinkerTool = Tools.Item("VCLinkerTool")
System.Console.WriteLine("Current value of ToolName: {0}", LinkerTool.ToolName)
Engine.RemoveProject("xx.vcproj")
End Sub
End Module

Sicurezza di .NET Framework

Vedere anche

Riferimenti

VCProjectEngineObjectClass Classe

Spazio dei nomi Microsoft.VisualStudio.VCProjectEngine