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
- bstrRef
Type: System.String
The assembly reference.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.