'<elementname>' refers to type '<typename>' in project '<projectname>', but type '<typename>' was not found in project '<projectname>'

An expression accesses a class, structure, module, or interface referred to in another project, but that project does not contain the specified type.

This error occurs when your project makes an indirect reference to another project in the same solution. Typically, your project makes a reference to an assembly that makes a reference to the other project. If the assembly accesses the specified type in the other project, the indirect reference to the type is established. However, if the type is not present in the other project, this error is generated.

Error ID: BC30960

To correct this error

  • If the cited type is no longer defined anywhere, then remove or replace the statement that attempts to access it. You might also need to make the same change in the assembly that provides the indirect reference to the cited type.

  • If the cited type is defined somewhere, then make a direct reference to the project or assembly that defines it.

See Also

Tasks

How to: Add or Remove References in Visual Studio (Visual Basic)

Concepts

Project References

Other Resources

Referencing Namespaces and Components

Managing References