The code below throws a strange exception. You'd expect it to complain that
FooStuff is inaccessable because it's private, but instead it says: "File or
assembly name giy710lb.dll, or one of its dependencies, was not found." And
to confuse the matter, the missing assembly in question is different every
time the exception is thrown.

Any ideas?

The code (watch for word wrap) is as follows.

using System;
using System.IO;
using System.Xml;
using System.Xml.Serialization;

namespace SerzBug
{
        public class Class1
        {
                // The nested class.
                class FooStuff {
                        [XmlElementAttribute("Foo")]
                        public string foo = "foo";
                }

                [STAThread]
                static void Main(string[] args)
                {
                        try {
                                XmlSerializer serz = new XmlSerializer( typeof( 
FooStuff ) );

                                Console.WriteLine( "Success." );
                        } catch ( Exception e ) {
                                Console.WriteLine( "Exception: {0}", e.Message );
                                if( e.InnerException != null )
                                        Console.WriteLine( "Inner Exception: {0}", 
e.InnerException.Message );
                        }
                }
        }
}

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
You may be interested in Guerrilla .NET, 24 March 2003, in London
http://www.develop.com/courses/gdotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to