OANavigableProjectItems.AddFromTemplate Method

Creates a new project item from an existing item template file and adds it to the project.

Namespace:  Microsoft.VisualStudio.Package.Automation
Assembly:  MPF.Project.NonShipping (in MPF.Project.NonShipping.dll)

Syntax

'宣言
Public Overridable Function AddFromTemplate ( _
    fileName As String, _
    name As String _
) As ProjectItem
'使用
Dim instance As OANavigableProjectItems
Dim fileName As String
Dim name As String
Dim returnValue As ProjectItem

returnValue = instance.AddFromTemplate(fileName, _
    name)
public virtual ProjectItem AddFromTemplate(
    string fileName,
    string name
)
public:
virtual ProjectItem^ AddFromTemplate(
    String^ fileName, 
    String^ name
)
public function AddFromTemplate(
    fileName : String, 
    name : String
) : ProjectItem

Parameters

  • fileName
    Type: System.String

    The absolute path of the template file.

Return Value

Type: ProjectItem

When implemented by derived classes, the newly-created ProjectItem.

Implements

ProjectItemsAddFromTemplate(String, String)

Remarks

By default this method is not implemented and throws a NotImplementedException.

Permissions

See Also

Reference

OANavigableProjectItems Class

OANavigableProjectItems Members

Microsoft.VisualStudio.Package.Automation Namespace