We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

Project.Delete Method

Removes the project from the current solution.

Note that this method is not currently implemented.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

public void CodeExample(DTE2 dte)
    {   // Open a project before running this sample.
        Project prj = dte.Solution.Projects.Item(1);
        Projects prjs;

        DialogResult del;
        del = MessageBox.Show("Delete project from solution?", "Delete Method", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
        if (del == DialogResult.Yes)
        del = MessageBox.Show("Save project as another filename?", "SaveAs Method", MessageBoxButtons.YesNo);
        if (del == DialogResult.Yes)
            prj.SaveAs(Interaction.InputBox("Save this project with new name: ", "SaveAs Method",
                "MyProjectWithNewName", 300, 300));
    catch(Exception ex)