VCProjectEngine.CreateProject Method
Creates a new project.
Namespace: Microsoft.VisualStudio.VCProjectEngine
Assembly: Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)
Syntax
声明
Function CreateProject ( _
projectName As String _
) As Object
用法
Dim instance As VCProjectEngine
Dim projectName As String
Dim returnValue As Object
returnValue = instance.CreateProject(projectName)
Object CreateProject(
string projectName
)
Object^ CreateProject(
[InAttribute] String^ projectName
)
function CreateProject(
projectName : String
) : Object
Parameters
projectName
Type: System.StringRequired. The name of the project (.vcproj) 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.vcproj");
myproj.Save()
End Sub
End Module
Permissions
- 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.