Microsoft KB Archive/816223

= BUG: You Receive an XmlException Error When You Build a Serialization Sample Application of the .NET Framework SDK =

Article ID: 816223

Article Last Modified on 8/28/2003

-

APPLIES TO


 * Microsoft .NET Framework Software Development Kit 1.0 Service Pack 2
 * Microsoft Visual Basic .NET 2003 Standard Edition
 * Microsoft Visual C# .NET 2003 Standard Edition

-





SYMPTOMS
When you try to build the Serialization application sample (from the Technologies samples) of Microsoft .NET Framework Software Development Kit (SDK) version 1.1, you receive the following error message:

Namespace or type 'Xml' for the Imports 'System.Xml' cannot be found.

Type 'XmlException' is not defined.

Note The serialization application sample is located in the following folder:

\Microsoft Visual Studio .NET 2003\SDK\v1.1\Samples\Technologies\Serialization



CAUSE
This problem occurs because the System.Xml reference is not included in the references of the application. Therefore, you receive the build errors in the application when you use the System.Xml assembly.



RESOLUTION
To resolve the problem, add the System.Xml reference to the application.

To add the System.Xml reference, follow these steps:
 * 1) On the View menu, click Solution Explorer.
 * 2) Expand SerializationVB.
 * 3) Right-click References, and then click Add Reference.
 * 4) In the Add Reference dialog box, on the .NET tab, select System.Xml.dll, and then click Select.
 * 5) On the Build menu, click Build Solution.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce the Behavior
 Locate and open the Serialization folder:

\Microsoft Visual Studio .NET 2003\SDK\v1.1\Samples\Technologies\Serialization

 Double-click to open either the vb folder or the cs folder. In Visual Studio .NET 2003, double-click to open either SerializationVB.sln or SerializationCS.sln. On the Build menu, click Build Solution.

You receive the error that is mentioned in the &quot;Symptoms&quot; section.

<div class="references_section">