test/Misc/EFTools/TestInfrastructure/VS/DteExtensions.cs
/// <summary>
///     Add a new item to the given project. If the given project is null, it will add the item at the solution level.
/// </summary>
/// <param name="dte">DTE instance</param>
/// <param name="itemTemplateName">the template name of the item which is shown on the new item wizard, e.g., "General\\Activity Diagram"</param>
/// <param name="itemFilename">the filename for the new item, including extension</param>
/// <param name="containingProject">the project where the new item will be added</param>
/// <returns>returns the added item</returns>
Add a new item to the given project. If the given project is null, it will add the item at the solution level.
Add a new item to the given project . If the given project is null it will add the item at the solution level .
public static ProjectItem AddNewItem(DTE dte, string itemTemplateName, string itemFilename, Project containingProject)
        {
            SelectProject(dte, containingProject);
            return dte.ItemOperations.AddNewItem(itemTemplateName, itemFilename);
        }
public static ProjectItem AddNewItem ( DTE dte , string itemTemplateName , string itemFilename , Project containingProject ) { SelectProject ( dte , containingProject ) ; return dte . ItemOperations . AddNewItem ( itemTemplateName , itemFilename ) ; }
Add a new item to the given project.
Add a new item to the given project .
// Select the containing project // Add the item
returns the added item
returns the added item
dte
DTE
None
itemTemplateName
string
the template name of the item which is shown on the new item wizard, e.g., "General\\Activity Diagram"
the template name of the item which is shown on the new item wizard e . g . " General \\ Activity Diagram "
itemFilename
string
the filename for the new item, including extension
the filename for the new item including extension
containingProject
Project
the project where the new item will be added
the project where the new item will be added