VCReferences.CanAddAssemblyReference Method (String)


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)

bool CanAddAssemblyReference(
	string bstrRef


Type: System.String

The assembly reference.

Return Value

Type: System.Boolean

true to add the given assembly reference; otherwise, false.

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.

Return to top