Solution3.AddIns Свойство
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Возвращает коллекцию AddIns, которая содержит все доступные в настоящий момент надстройки, связанные с решением.
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
Значение свойства
Коллекция AddIns.
Реализации
- Атрибуты
Примеры
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);
}
}
Комментарии
Использовать надстройки не рекомендуется. Дополнительные сведения см. в разделе часто задаваемые вопросы: преобразование надстроек в расширения VSPackage.