VCConfiguration.CopyTo - метод
Copies the current configuration.
Пространство имен: Microsoft.VisualStudio.VCProjectEngine
Сборка: Microsoft.VisualStudio.VCProjectEngine (в Microsoft.VisualStudio.VCProjectEngine.dll)
Синтаксис
'Декларация
Sub CopyTo ( _
Config As Object _
)
'Применение
Dim instance As VCConfiguration
Dim Config As Object
instance.CopyTo(Config)
void CopyTo(
Object Config
)
void CopyTo(
Object^ Config
)
function CopyTo(
Config : Object
)
Параметры
Config
Тип: System.ObjectRequired. The configuration into which you want to copy the current configuration's settings.
Заметки
This method is useful when you have added a configuration and want to copy the settings from an existing configuration to the new configuration.
Примеры
See How to: Compile Example Code for Project Model Extensibility for information about how to compile and run this example.
The following example invokes the CopyTo 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 cfgs As IVCCollection
Dim cfg, Dest As VCConfiguration
Dim Dest_obj As Object
prj = DTE.Solution.Projects.Item(1).Object
cfgs = prj.Configurations
cfg = cfgs.Item("Debug")
Dest = cfgs.Item("Release")
Dest_obj = Dest
cfg.CopyTo(Dest_obj)
End Sub
End Module
Разрешения
- Полное доверие для непосредственно вызывающего метода. Этот член не может быть использован частично доверенным кодом. Дополнительные сведения см. в разделе Using Libraries from Partially Trusted Code.