VCProjectEngine.LoadProject Method

Loads a project.

Namespace: Microsoft.VisualStudio.VCProjectEngine
Assembly: Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)


Function LoadProject ( _
    projectName As String _
) As Object
Object LoadProject(
    string projectName
Object^ LoadProject(
    [InAttribute] String^ projectName
abstract LoadProject : 
        projectName:string -> Object
function LoadProject(
    projectName : String
) : Object


Return Value

Type: System.Object
A VCProject object.


See How to: Compile Example Code for Project Model Extensibility for information about how to compile and run this example.

This method cannot be called from script. It must be called from an application that creates a new instance of the project engine.

' 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.vcxproj")

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

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

.NET Framework Security

See Also


VCProjectEngine Interface

Microsoft.VisualStudio.VCProjectEngine Namespace