Solution3.AddIns Propriedade
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Obtém uma AddIns coleção, que contém todos os suplementos disponíveis no momento associados à solução.
public:
property EnvDTE::AddIns ^ AddIns { EnvDTE::AddIns ^ get(); };
[System.Runtime.InteropServices.DispId(32)]
public EnvDTE.AddIns AddIns { [System.Runtime.InteropServices.DispId(32)] get; }
[<System.Runtime.InteropServices.DispId(32)>]
[<get: System.Runtime.InteropServices.DispId(32)>]
member this.AddIns : EnvDTE.AddIns
Public ReadOnly Property AddIns As AddIns
Valor da propriedade
Uma coleção AddIns.
Implementações
- Atributos
Exemplos
Sub Solution3Example(ByVal dte As DTE2)
' This function creates a solution and adds a Visual C# Console
' project to it.
Try
Dim soln As Solution3 = CType(DTE.Solution, Solution3)
Dim csTemplatePath As String
' This path must exist on your computer.
' Replace <file path> below with an actual path.
Dim csPrjPath As String = "<file path>"
MsgBox("starting")
' Get the project template path for a C# console project.
csTemplatePath = CType(soln.GetProjectTemplate _
("ConsoleApplication.zip", "CSharp"), string)
' Create a new C# Console project using the template obtained
' above.
soln.AddFromTemplate(csTemplatePath, csPrjPath, _
"New CSharp Console Project", False)
MsgBox("done")
Catch ex As System.Exception
MsgBox(ex.ToString)
End Try
End Sub
using System.Windows.Forms;
public void Solution3Example(DTE2 dte)
{
// This function creates a solution and adds a Visual C# Console
// project to it.
try{
Solution3 soln = (Solution3)_applicationObject.Solution;
String csTemplatePath;
// The file path must exist on your computer.
// Replace <file path> below with an actual path.
String csPrjPath = "<file path>";
"<file path>MessageBox.Show("Starting...");
"<file path>"<file path>csTemplatePath =
soln.GetProjectTemplate("ConsoleApplication.zip", "CSharp");
// Create a new C# Console project using the template obtained
// above.
soln.AddFromTemplate(csTemplatePath, csPrjPath,
"New CSharp Console Project", false);
MessageBox.Show("Done!");
}
catch(SystemException ex)
{
MessageBox.Show("ERROR: " + ex);
}
}
Comentários
Os suplementos são preteridos. Para obter mais informações, consulte perguntas frequentes: convertendo suplementos em extensões VSPackage.