Creates a new project item from an existing item template file and adds it to the project.
Namespace: EnvDTE
Assembly: EnvDTE (in envdte.dll)
Visual Basic (Declaration)
Function AddFromTemplate ( _
<InAttribute> FileName As String, _
<InAttribute> Name As String _
) As ProjectItem
Dim instance As ProjectItems
Dim FileName As String
Dim Name As String
Dim returnValue As ProjectItem
returnValue = instance.AddFromTemplate(FileName, Name)
ProjectItem AddFromTemplate (
[InAttribute] string FileName,
[InAttribute] string Name
)
ProjectItem^ AddFromTemplate (
[InAttribute] String^ FileName,
[InAttribute] String^ Name
)
ProjectItem AddFromTemplate (
/** @attribute InAttribute() */ String FileName,
/** @attribute InAttribute() */ String Name
)
function AddFromTemplate (
FileName : String,
Name : String
) : ProjectItem
Parameters
- FileName
Required. The full path and file name of the template project file.
- Name
Required. The file name to use for the new project item.
Return Value
A ProjectItem object.
When you call AddFromTemplate, there is no need to explicitly create a new solution (such as with DTE.Solution.Create), because AddFromTemplate automatically creates a solution.