BUG: The Visual Basic .NET compiler may stop responding when you try to build a project in Visual Studio .NET (831489)
The information in this article applies to:
- Microsoft Visual Basic .NET (2003)
- Microsoft Visual Basic .NET (2002)
SYMPTOMSWhen you try to build a Microsoft Visual Basic .NET project
in Microsoft Visual Studio .NET, the Visual Basic .NET compiler may stop
responding. You may receive the following error message: Visual Basic .NET compiler is unable to recover from the following
error: System Error &Hc0000005& (Visual Basic internal compiler
error)
Save your work and restart Visual Studio
.NET. CAUSEThis bug occurs if your Visual Basic .NET project contains a
file that uses the DirectCast keyword to pass an argument to the constructor of an attribute.
For example, this behavior occurs if your project contains a file that uses the
following code: <DefaultValueAttribute(DirectCast(Nothing, String))> WORKAROUNDTo work around this bug, follow these steps:
- Exit Visual Studio .NET after you receive the error message
that is mentioned in the "Symptoms" section of this article.
- Restart Visual Studio .NET.
- Use the CType keyword in your code instead
of the using the DirectCast keyword in your code.
For example, your project may contain a file that uses the following
code:<DefaultValueAttribute(DirectCast(Nothing, String))> Replace this code with the following code:<DefaultValueAttribute(CType(Nothing, String))> The new code uses the CType keyword instead of the
DirectCast keyword.
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 Microsoft Web
sites:
Modification Type: | Minor | Last Reviewed: | 2/9/2006 |
---|
Keywords: | kbvs2005swept kbvs2005doesnotapply kbvs2002sp1sweep kbProgramming kbIDEProject kbCompiler kbSample kberrmsg kbcode kbbug KB831489 kbAudDeveloper |
---|
|