Project.ConfigurationManager - свойство
Возвращает объект ConfigurationManager для Project.
Пространство имен: EnvDTE
Сборка: EnvDTE (в EnvDTE.dll)
Синтаксис
'Декларация
ReadOnly Property ConfigurationManager As ConfigurationManager
ConfigurationManager ConfigurationManager { get; }
property ConfigurationManager^ ConfigurationManager {
ConfigurationManager^ get ();
}
abstract ConfigurationManager : ConfigurationManager with get
function get ConfigurationManager () : ConfigurationManager
Значение свойства
Тип: EnvDTE.ConfigurationManager
Объект ConfigurationManager.
Заметки
ConfigurationManager Представляет объект конфигурации проекта для проекта или элемента проекта. Имя конфигурации проекта и имя платформы однозначно определяют каждую конфигурацию проекта.
Примеры
Sub ConfigurationManagerExample(ByVal dte As DTE2)
' Before running this sample, open a project.
Dim proj As Project = dte.Solution.Item(1)
Dim manager As ConfigurationManager = proj.ConfigurationManager
' Define a new Debug-based configuration for the project.
Dim configs As Configurations = _
manager.AddConfigurationRow("MyDebug", "Debug", False)
Dim config As EnvDTE.Configuration
Dim msg As String
' List all build configurations for the project.
For Each config In configs
msg &= config.ConfigurationName
Next
MsgBox(proj.Name & " defines the following build configurations:" _
& vbCrLf & vbCrLf & msg)
End Sub
public void ConfigurationManagerExample(DTE2 dte)
{
// Before running this sample, open a project.
Project proj = dte.Solution.Item(1);
ConfigurationManager manager = proj.ConfigurationManager;
// Define a new Debug-based configuration for the project.
Configurations configs =
manager.AddConfigurationRow("MyDebug", "Debug", false);
string msg = "";
// List all build configurations for the project.
foreach (EnvDTE.Configuration config in configs)
msg += config.ConfigurationName;
MessageBox.Show(proj.Name +
" defines the following build configurations:\n\n" + msg);
}
Безопасность платформы .NET Framework
- Полное доверие для непосредственно вызывающего метода. Этот член не может быть использован частично доверенным кодом. Для получения дополнительной информации см. Использование библиотек из не вполне надежного кода.
См. также
Ссылки
Другие ресурсы
Практическое руководство. Компиляция и выполнение примеров кода модели объектов автоматизации