VCProjectEngineObjectClass.CreateProject Method
Creates a new project.
Namespace: Microsoft.VisualStudio.VCProjectEngine
Assembly: Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)
Syntax
声明
Public Overridable Function CreateProject ( _
projectName As String _
) As Object
用法
Dim instance As VCProjectEngineObjectClass
Dim projectName As String
Dim returnValue As Object
returnValue = instance.CreateProject(projectName)
public virtual Object CreateProject(
string projectName
)
public:
virtual Object^ CreateProject(
[InAttribute] String^ projectName
)
public function CreateProject(
projectName : String
) : Object
Parameters
projectName
Type: System.String
Return Value
Type: System.Object
Implements
VCProjectEngine.CreateProject(String)
Remarks
Do not instantiate VCProjectEngineObjectClass. Instantiate VCProjectEngineObject instead, as shown below:
Dim Engine As VCProjectEngine
Engine = New VCProjectEngineObject()
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
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.
See Also
Reference
VCProjectEngineObjectClass Class