Solution3.Remove(Project) Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Belirtilen projeyi çözümden kaldırır.
public:
void Remove(EnvDTE::Project ^ proj);
public:
void Remove(EnvDTE::Project ^ proj);
void Remove(EnvDTE::Project const & proj);
[System.Runtime.InteropServices.DispId(25)]
public void Remove (EnvDTE.Project proj);
[<System.Runtime.InteropServices.DispId(25)>]
abstract member Remove : EnvDTE.Project -> unit
Public Sub Remove (proj As Project)
Parametreler
- proj
- Project
Gereklidir. Çözümden kaldırılacak proje.
Uygulamalar
- Öznitelikler
Örnekler
Sub SolnRemoveExample(ByVal dte As DTE2)
' Removes a project from a solution.
' Open a solution that contains at least one project in Visual Studio.
Dim soln As Solution2 = CType(dte.Solution, Solution2)
Dim proj As Project = soln.Projects.Item(1)
Try
' Delete the first project in the solution.
MsgBox("Ready to delete the project.")
soln.Remove(proj)
MsgBox("Project was deleted from the solution.")
' Close the solution from the IDE.
soln.Close()
Catch ex As SystemException
MsgBox("ERROR: " & ex.ToString())
End Try
End Sub
using System.Windows.Forms;
public void SolnOpenExample(DTE2 dte)
{
// Removes the first project from a solution.
// Open a solution that contains at least one project before
// running this example.
Solution2 soln = (Solution2)_applicationObject.Solution;
Project proj = soln.Projects.Item(1);
try
{
// Delete the first project in the solution.
MessageBox.Show("Ready to delete the project.");
soln.Remove(proj);
MessageBox.Show("Project was deleted from the solution.");
// Close the solution from the IDE.
soln.Close(false);
}
catch (SystemException ex)
{
MessageBox.Show("ERROR: " + ex);
}
}