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.StringThe absolute path of the template file.
name
Type: System.StringThe name of the project item.
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
- 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.