Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Adds an existing item to the current project.
Namespace: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Syntax
'Declaration
Function AddExistingItem ( _
FileName As String _
) As ProjectItem
ProjectItem AddExistingItem(
string FileName
)
ProjectItem^ AddExistingItem(
[InAttribute] String^ FileName
)
abstract AddExistingItem :
FileName:string -> ProjectItem
function AddExistingItem(
FileName : String
) : ProjectItem
Parameters
- FileName
Type: System.String
Required. The full path and file name of the item to be added.
Return Value
Type: EnvDTE.ProjectItem
A ProjectItem object.
Examples
Sub AddExistingItemExample()
Dim ItemOp As ItemOperations
ItemOp = DTE.ItemOperations
' Add a log file to the project.
ItemOp.AddExistingItem("d:\windows\ocgen.log")
End Sub
.NET Framework Security
- 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.