Export (0) Print
Expand All
Expand Minimize

ProducesPrimaryInteropAssembly Property

Visual Studio .NET 2003

Specifies whether this is a primary interop assembly. Exposes the functionality of the /primary option.

[Visual Basic .NET]
Public Property ProducesPrimaryInteropAssembly() As Boolean
[Visual Basic 6]
Property Get ProducesPrimaryInteropAssembly() As Boolean
Property Let ProducesPrimaryInteropAssembly( _
   ByVal NewValue As Boolean _
HRESULT __stdcall get_ProducesPrimaryInteropAssembly(
   /* [out, retval] */ VARIANT_BOOL* retVal
HRESULT __stdcall put_ProducesPrimaryInteropAssembly(
   /* [in] */ VARIANT_BOOL NewValue
public bool ProducesPrimaryInteropAssembly {get; set;}
[JScript .NET]
public function get ProducesPrimaryInteropAssembly() : Boolean
public function set ProducesPrimaryInteropAssembly(
   NewValue : Boolean


A Boolean value specifying whether if this is a primary interop assembly; true if it is, false if not.

Return Value

true if this is a primary interop assembly; false if not.


This property is used primarily for trusted code where you do not want a lot of extraneous copies existing.

The assembly is found in the Global Assembly Cache (GAC) and is usually signed. For example, VCProjectEngine.dll is found there (it is wrapped).


' Add a reference to Microsoft.VisualStudio.VCProjectEngine and have a 
' Visual C++ .NET project loaded before running this example.
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine
Public Module Module1
    Sub Test()
        Dim prj As VCProject
        Dim cfgs, tools As IVCCollection
        Dim cfg As VCConfiguration
        Dim tool As VCManagedWrapperGeneratorTool
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        cfg = cfgs.Item(1)
        tool = cfg.Tools("VCManagedWrapperGeneratorTool")
        MsgBox("Produces PrimaryInterop Assembly? : " & _
    End Sub
End Module

See Samples for Project Model Extensibility for information on how to compile and run this sample.

See Also

Applies To: VCManagedWrapperGeneratorTool Object

© 2015 Microsoft