VCProjectConfigurationProperties.ManagedExtensions 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指定此配置使用 Visual C++。 公开 c + + 编译器的 /clr (公共语言运行时编译) 选项的功能。
public:
property Microsoft::VisualStudio::VCProject::compileAsManagedOptions ManagedExtensions { Microsoft::VisualStudio::VCProject::compileAsManagedOptions get(); void set(Microsoft::VisualStudio::VCProject::compileAsManagedOptions value); };
public:
property Microsoft::VisualStudio::VCProject::compileAsManagedOptions ManagedExtensions { Microsoft::VisualStudio::VCProject::compileAsManagedOptions get(); void set(Microsoft::VisualStudio::VCProject::compileAsManagedOptions value); };
[System.Runtime.InteropServices.DispId(740)]
public Microsoft.VisualStudio.VCProject.compileAsManagedOptions ManagedExtensions { [System.Runtime.InteropServices.DispId(740)] get; [System.Runtime.InteropServices.DispId(740)] set; }
[<System.Runtime.InteropServices.DispId(740)>]
[<get: System.Runtime.InteropServices.DispId(740)>]
[<set: System.Runtime.InteropServices.DispId(740)>]
member this.ManagedExtensions : Microsoft.VisualStudio.VCProject.compileAsManagedOptions with get, set
Public Property ManagedExtensions As compileAsManagedOptions
属性值
一个 compileAsManagedOptions 枚举。
- 属性
示例
[Visual Basic]
下面的示例代码修改 VCConfiguration ManagedExtensions 开发环境中的对象属性:
' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine
Public Module Module1
Sub Test()
Dim MyString As String
Dim prj As VCProject
Dim cfgs As IVCCollection
Dim cfg As VCConfiguration
Dim MyDbg As VCDebugSettings
prj = DTE.Solution.Projects.Item(1).Object
cfgs = prj.Configurations
cfg = cfgs.Item(1)
cfg.ManagedExtensions = True
End Sub
End Module
注解
如果您设置此属性而不是编译器工具的 CompileAsManaged 属性,则还会为您设置链接器的其他相关属性 <xref:Microsoft.VisualStudio.VCProjectEngine.VCWebServiceProxyGeneratorTool> 。 设置编译器的 CompileAsManaged 属性将直接重写 ManagedExtensions 配置上的属性。
有关如何编译和运行此示例的信息,请参阅 如何:编译项目模型扩展性的示例代码 。