BUG: You receive a "Reference required to assembly" error message when you run a Visual Basic .NET application (818411)
The information in this article applies to:
- Microsoft Visual Basic .NET (2003)
- Microsoft Visual Basic .NET (2002)
SYMPTOMSIf your Windows Application project refers to both a Visual
Basic .NET Class Library project and a Microsoft Visual C# .NET Class Library
project, and you call a method in a Visual C# .NET class instance, you receive
the following error message: Reference required to
assembly 'ClassLibrary1' containing the type 'ClassLibrary1.Class1'. Add one to
your project. You only receive the error if you have all the
following things:
- A Class Library project in Visual Basic .NET.
- A Class Library project in Visual C# .NET that refers to
the Visual Basic .NET Class Library project.
- A method in Visual C# .NET that returns an instance of a
Visual Basic .NET class.
RESOLUTION To resolve this bug, refer to the assembly directly instead
of adding references to the project. To do this, follow these steps:
- In Solution Explorer, expand References
under WindowsApplication1.
- Right-click ClassLibrary1, and then click
Remove.
- Right-click WindowsApplication1, and then
click Add Reference.
- Click the .NET tab, and then click
Browse.
- Locate ClassLibrary1.dll in the
bin folder of ClassLibrary1.
- Click ClassLibrary1.dll, and then click
Open.
STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are
listed at the beginning of this article.
REFERENCESFor more information, visit the following MSDN Web site:
Modification Type: | Minor | Last Reviewed: | 2/3/2006 |
---|
Keywords: | kbvs2005swept kbvs2005doesnotapply kbvs2002sp1sweep kbWindowsForms kbDLL kbbug KB818411 kbAudDeveloper |
---|
|