By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,143 Members | 1,254 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,143 IT Pros & Developers. It's quick & easy.

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

P: n/a
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(Namespac e="http://mysite.com/even
tImportSchema")]

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

public class events {


[System.Xml.Serialization.XmlElementAttribute("even t")]

public eventsEvent[] Items;

}

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

public class eventsEvent {


public string date;


public string title;


public string venue;


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

public eventsEventEventType[] eventType;


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

public eventsEventOrgAbout[] orgAbout;


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

public eventsEventMediasMedia[][] medias;

}

[System.Xml.Serialization.XmlTypeAttribute(Namespac e="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(Namespac e="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(Namespac e="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(Namespac e="http://mysite.com/even
tImportSchema")]

public class eventsEventOrgAbout {


[System.Xml.Serialization.XmlAttributeAttribute()]

public string ID;


[System.Xml.Serialization.XmlTextAttribute()]

public string Value;

}

Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Try Chris Sells tool at:
http://sellsbrothers.com/tools/#XmlS...zerPreCompiler
"Gary Brewer" <ga**@nospam.com> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
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(Namespac e="http://mysite.com/even tImportSchema")]

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

public class events {


[System.Xml.Serialization.XmlElementAttribute("even t")]

public eventsEvent[] Items;

}

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

public class eventsEvent {


public string date;


public string title;


public string venue;


[System.Xml.Serialization.XmlElementAttribute("even tType", IsNullable=true)]
public eventsEventEventType[] eventType;


[System.Xml.Serialization.XmlElementAttribute("orgA bout", IsNullable=true)]
public eventsEventOrgAbout[] orgAbout;


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

public eventsEventMediasMedia[][] medias;

}

[System.Xml.Serialization.XmlTypeAttribute(Namespac e="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(Namespac e="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(Namespac e="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(Namespac e="http://mysite.com/even tImportSchema")]

public class eventsEventOrgAbout {


[System.Xml.Serialization.XmlAttributeAttribute()]

public string ID;


[System.Xml.Serialization.XmlTextAttribute()]

public string Value;

}

Nov 12 '05 #2

P: n/a
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:%2****************@TK2MSFTNGP09.phx.gbl...
Try Chris Sells tool at:
http://sellsbrothers.com/tools/#XmlS...zerPreCompiler
"Gary Brewer" <ga**@nospam.com> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
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(Namespac e="http://mysite.com/even
tImportSchema")]

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

public class events {


[System.Xml.Serialization.XmlElementAttribute("even t")]

public eventsEvent[] Items;

}

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

public class eventsEvent {


public string date;


public string title;


public string venue;


[System.Xml.Serialization.XmlElementAttribute("even tType",

IsNullable=true)]

public eventsEventEventType[] eventType;


[System.Xml.Serialization.XmlElementAttribute("orgA bout",

IsNullable=true)]

public eventsEventOrgAbout[] orgAbout;


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

public eventsEventMediasMedia[][] medias;

}

[System.Xml.Serialization.XmlTypeAttribute(Namespac e="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(Namespac e="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(Namespac e="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(Namespac e="http://mysite.com/even
tImportSchema")]

public class eventsEventOrgAbout {


[System.Xml.Serialization.XmlAttributeAttribute()]

public string ID;


[System.Xml.Serialization.XmlTextAttribute()]

public string Value;

}


Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.