Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

instantiation of xmlserializer gives me error in [randomname].dll

0 views
Skip to first unread message

Gary Brewer

unread,
Jan 30, 2004, 7:49:58 AM1/30/04
to
Below are my classes generated using XSD.EXE from XML/XSLT


When I do

XmlSerializer xmls=new XmlSerializer(typeof(events[]));

I get

An unhandled exception of type 'System.IO.FileNotFoundException' occurred in
mscorlib.dll

Additional information: File or assembly name d4xnc6_9.dll, or one of its
dependencies, was not found.


(The DLL name is random), the class' are below.


Gary

[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
tImportSchema")]

[System.Xml.Serialization.XmlRootAttribute(Namespace="http://mysite.com/even
tImportSchema", IsNullable=false)]

public class events {


[System.Xml.Serialization.XmlElementAttribute("event")]

public eventsEvent[] Items;

}

[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
tImportSchema")]

public class eventsEvent {


public string date;


public string title;


public string venue;


[System.Xml.Serialization.XmlElementAttribute("eventType", IsNullable=true)]

public eventsEventEventType[] eventType;


[System.Xml.Serialization.XmlElementAttribute("orgAbout", IsNullable=true)]

public eventsEventOrgAbout[] orgAbout;


[System.Xml.Serialization.XmlArrayItemAttribute("media",
typeof(eventsEventMediasMedia), IsNullable=false)]

public eventsEventMediasMedia[][] medias;

}

[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
tImportSchema")]

public class eventsEventEventType {


[System.Xml.Serialization.XmlAttributeAttribute()]

public string ID;


[System.Xml.Serialization.XmlTextAttribute()]

public string Value;

}

[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
tImportSchema")]

public class eventsEventMediasMediaType {


[System.Xml.Serialization.XmlAttributeAttribute()]

public string ID;


[System.Xml.Serialization.XmlTextAttribute()]

public string Value;

}

[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
tImportSchema")]

public class eventsEventMediasMedia {


public string url;


public string access;


public string password;


public string content;


[System.Xml.Serialization.XmlElementAttribute("type", IsNullable=true)]

public eventsEventMediasMediaType[] type;

}

[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
tImportSchema")]

public class eventsEventOrgAbout {


[System.Xml.Serialization.XmlAttributeAttribute()]

public string ID;


[System.Xml.Serialization.XmlTextAttribute()]

public string Value;

}

Daniel Cazzulino

unread,
Jan 30, 2004, 10:19:19 AM1/30/04
to
Try Chris Sells tool at:
http://sellsbrothers.com/tools/#XmlSerializerPreCompiler


"Gary Brewer" <ga...@nospam.com> wrote in message
news:%23TeWB%23y5DH...@TK2MSFTNGP09.phx.gbl...

Gary Brewer

unread,
Jan 30, 2004, 10:59:28 AM1/30/04
to
Thanks, thats a brilliant tool and does the job perfect (well it tells me
whats wrong).

XSD.EXE converts XML into XSD files into class files, which is a great
feature but I would have thought that using this tool and using
serialisation would go hand in hand.

The fact that I cannot deserialise something into my generated class is
slightly annoying (an the error message in VS.NET is even more crazy!)

Will this be fixed in a new version or is there a reason for this?


Thanks,

Gary Brewer

"Daniel Cazzulino" <kz...@INVALIDaspnet2.com> wrote in message
news:%23rLwwR0...@TK2MSFTNGP09.phx.gbl...

0 new messages