This documentation is archived and is not being maintained.

UseStrictReferenceResolution Property

Visual Studio .NET 2003

Specifies whether assemblies in "Resolve Reference Files" are used for reference resolution. Exposes the functionality of the /strictref option.

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


A Boolean value specifying whether assemblies in "Resolve Reference Files" are used for reference resolution. true if they are; false if not.

Return Value

True if assemblies in "Resolve Reference Files" are used for reference resolution; false if not.


The logic for this property is: if an explicit list of assemblies is not provided, then fail the build.


' 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("Use strict reference resolution?: " & _
    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