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
声明
Function CanAddAssemblyReference ( _
bstrRef As String _
) As Boolean
用法
Dim instance As VCReferences
Dim bstrRef As String
Dim returnValue As Boolean
returnValue = instance.CanAddAssemblyReference(bstrRef)
bool CanAddAssemblyReference(
string bstrRef
)
bool CanAddAssemblyReference(
[InAttribute] String^ bstrRef
)
function CanAddAssemblyReference(
bstrRef : String
) : boolean
Parameters
bstrRef
Type: System.StringThe 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.
Permissions
- 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.