Compartilhar via


VCProjectEngineObjectClass.CreateProject(String) Method

Definition

Creates a new project.

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

Parameters

projectName
String

Name of the project

Returns

An object.

Implements

Attributes

Examples

' 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.vcproj");  
myproj.Save()  
End Sub      
End Module  

Remarks

Do not instantiate VCProjectEngineObjectClass. Instantiate VCProjectEngineObject instead, as shown below:

Dim Engine As VCProjectEngine  
Engine = New VCProjectEngineObject()  

Applies to