BUG: UML code generator places IMPORTS inside namespace declarations (317578)
The information in this article applies to:
- Microsoft Visio for Enterprise Architects (2002)
- Microsoft Visual Basic .NET (2002)
This article was previously published under Q317578 SYMPTOMS When you use the Unified Modeling Language (UML) software
diagram template that is included with Visio 2002 to generate Visual Basic .NET
(VB.NET) code, you may receive the following compile error message when a class
imports a class from another namespace: "Imports
statement must precede any declaration" CAUSE The code generator places the VB.NET IMPORTS statement inside the namespace declaration. The VB.NET language
specification requires that you place the IMPORTS statement outside the namespace declaration.
NOTE: This behavior does not occur when you use C# to generate code.
Although Microsoft Visio for Enterprise Architects (VEA) generates the C# USING command inside the namespace declaration, the C# language
specification permits this construction. STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
This bug was corrected in Visual Studio .NET 2003.
Modification Type: | Minor | Last Reviewed: | 1/25/2006 |
---|
Keywords: | kbvs2005doesnotapply kbvs2005swept kbtshoot kberrmsg kbvs2002sp1sweep kbbug kbpending KB317578 kbAudDeveloper |
---|
|