VCProject.AddConfiguration - метод
Adds a configuration to the current project.
Пространство имен: Microsoft.VisualStudio.VCProjectEngine
Сборка: Microsoft.VisualStudio.VCProjectEngine (в Microsoft.VisualStudio.VCProjectEngine.dll)
Синтаксис
'Декларация
Sub AddConfiguration ( _
ConfigurationName As String _
)
'Применение
Dim instance As VCProject
Dim ConfigurationName As String
instance.AddConfiguration(ConfigurationName)
void AddConfiguration(
string ConfigurationName
)
void AddConfiguration(
String^ ConfigurationName
)
function AddConfiguration(
ConfigurationName : String
)
Параметры
ConfigurationName
Тип: System.StringRequired. The configuration name.
Заметки
The Configurations property returns the configurations that are on the current project.
To have this configuration be useful, you must call the CopyTo method to copy basic settings from an existing configuration to the new configuration. Otherwise, you must set even the most rudimentary options yourself.
Примеры
See How to: Compile Example Code for Project Model Extensibility for information about how to compile and run this example.
The following example uses the AddConfiguration method in the integrated development environment (IDE):
' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine
Public Module Module1
Sub Test()
Dim prj As VCProject
Dim cfg As VCConfiguration
prj = DTE.Solution.Projects.Item(1).Object
prj.AddConfiguration("addedConfig")
End Sub
End Module
Разрешения
- Полное доверие для непосредственно вызывающего метода. Этот член не может быть использован частично доверенным кодом. Дополнительные сведения см. в разделе Using Libraries from Partially Trusted Code.