NAnt SDK Documentation - v0.92 |

# ProjectReferenceBase.GetAssemblyReferences Method

Gets the complete set of assemblies that need to be referenced when a project references this project.

[Visual Basic]
Overrides Public Function GetAssemblyReferences( _
ByVal solutionConfiguration As Configuration _
) As StringCollection
[C#]
public override StringCollection GetAssemblyReferences(
Configuration solutionConfiguration
);

#### Parameters

solutionConfiguration
  The solution configuration that is built.

#### Return Value

The complete set of assemblies that need to be referenced when a project references this project.

#### Remarks

Apparently, there's some hack in VB.NET that allows a type to be used that derives from a type in an assembly that is not referenced by the project.

When building from the command line (using vbc), the following error is reported "error BC30007: Reference required to assembly 'X' containing the base class 'X'. Add one to your project".

Somehow VB.NET can workaround this issue, without actually adding a reference to that assembly. I verified this with both VS.NET 2003 and VS.NET 2005.

For now, we have no other option than to return all assembly references of the referenced project if the parent is a VB.NET project.

#### See Also

ProjectReferenceBase Class | NAnt.VSNet Namespace