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



The information in this article applies to:

  • Microsoft .NET Framework SDK 1.1
  • Microsoft Visual Basic .NET (2003)
  • Microsoft Visual C# .NET (2003)

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:

%Program Files%\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.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Locate and open the Serialization folder:

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

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

    You receive the error that is mentioned in the "Symptoms" section.

REFERENCES

For more information about the XmlException class, visit the following MSDN Web site:

Modification Type:MajorLast Reviewed:8/28/2003
Keywords:kbSerial kbSDK kbXML kberrmsg kbbug KB816223 kbAudDeveloper