VCProjectEngineObjectClass.LoadProject(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Loads a project.
public:
virtual System::Object ^ LoadProject(System::String ^ projectName) = Microsoft::VisualStudio::VCProjectEngine::VCProjectEngine::LoadProject;
public:
virtual Platform::Object ^ LoadProject(Platform::String ^ projectName) = Microsoft::VisualStudio::VCProjectEngine::VCProjectEngine::LoadProject;
virtual winrt::Windows::Foundation::IInspectable LoadProject(std::wstring const & projectName);
[System.Runtime.InteropServices.DispId(214)]
public virtual object LoadProject (string projectName);
[<System.Runtime.InteropServices.DispId(214)>]
abstract member LoadProject : string -> obj
override this.LoadProject : string -> obj
Public Overridable Function LoadProject (projectName As String) As Object
Parameters
- projectName
- String
Required. The project name.
Returns
A VCProject object.
Implements
- Attributes
Examples
' 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
Remarks
Do not instantiate VCProjectEngineObjectClass
. Instantiate VCProjectEngineObject
instead, as shown below:
Dim Engine As VCProjectEngine
Engine = New VCProjectEngineObject()