Sdílet prostřednictvím


VCProjectEngine.CreateProject(String) Method

Definition

Creates a new project.

public:
 System::Object ^ CreateProject(System::String ^ projectName);
public:
 Platform::Object ^ CreateProject(Platform::String ^ projectName);
winrt::Windows::Foundation::IInspectable CreateProject(std::wstring const & projectName);
[System.Runtime.InteropServices.DispId(213)]
public object CreateProject (string projectName);
[<System.Runtime.InteropServices.DispId(213)>]
abstract member CreateProject : string -> obj
Public Function CreateProject (projectName As String) As Object

Parameters

projectName
String

Required. The name of the project (.vcxproj) file.

Returns

A VCProject object.

Attributes

Examples

CreateProject cannot be called from script. It must be called from an application that created a new instance of the project engine.

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

Module Module1  
Sub Main()  
Dim Engine As VCProjectEngine  
Dim myproj As VCProject  
Engine = New VCProjectEngineObject()  
myproj = Engine.CreateProject("xxxj")  
myproj.ProjectFile("c:\Documents and Settings\test\xxx.vcxproj");  
myproj.Save()  
End Sub      
End Module  

Applies to