Share via


VCReferences.CanAddAssemblyReference Method

Returns a value indicating whether to add the given assembly (.NET) reference.

Namespace:  Microsoft.VisualStudio.VCProjectEngine
Assembly:  Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)

Syntax

'Declaration
Function CanAddAssemblyReference ( _
    bstrRef As String _
) As Boolean
bool CanAddAssemblyReference(
    string bstrRef
)
bool CanAddAssemblyReference(
    [InAttribute] String^ bstrRef
)
abstract CanAddAssemblyReference : 
        bstrRef:string -> bool 
function CanAddAssemblyReference(
    bstrRef : String
) : boolean

Parameters

Return Value

Type: System.Boolean
true to add the given assembly reference; otherwise, false.

Remarks

It would not be okay to add an assembly reference if, for example, you have an invalid GUID.

This method is generally used in tandem with the AddAssemblyReference method. You use this method to determine whether it is okay to add an assembly reference, and then if it is, then you call AddAssemblyReference.

.NET Framework Security

See Also

Reference

VCReferences Interface

Microsoft.VisualStudio.VCProjectEngine Namespace