VCProjectEngine.CreateProject Method
Creates a new project.
Namespace: Microsoft.VisualStudio.VCProjectEngine
Assembly: Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)
Syntax
'Declaração
Function CreateProject ( _
projectName As String _
) As Object
Object CreateProject(
string projectName
)
Object^ CreateProject(
[InAttribute] String^ projectName
)
abstract CreateProject :
projectName:string -> Object
function CreateProject(
projectName : String
) : Object
Parameters
- projectName
Type: System.String
Required. The name of the project (.vcxproj) file.
Return Value
Type: System.Object
A VCProject object.
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
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.