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

Problem serializing class to XML

P: n/a
Hello all;

I seem to be having some trouble serializing a class to XML. This code is a
cut & paste from a project which used it perfectly, but all of a sudden I'm
getting an error that the "dll ogerh_f6.dll or one of its dependancies
cannot be found". The class I'm serializing is quite simple, with a couple
of string properties marked with the XmlElementAttribute. The class is
marked with the Serializable attribute. As such, I don't believe the class
is the problem - as I mentioned, I've used this exact code successfully
before.

The code is blowing up when I try to create an instance of the XmlSerializer
class. I have no idea what the ogerh_f6.dll file is or does. I searched
Google for it to no avail.

Any idea where I should be looking?

The code and error is below.

Thanks,

Derrick

public void Save()

{

if(!Directory.Exists(settingsLocation))

{

Directory.CreateDirectory(settingsLocation);

}

using(TextWriter tw = File.CreateText(settingsLocation + settingsFile))

{

XmlSerializer xs = new XmlSerializer(typeof(ReaderHistory));
//Blowing up here

xs.Serialize(tw,this);

}
}
---
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in
mscorlib.dll
Additional information: File or assembly name ogerh_f6.dll, or one of its
dependencies, was not found.
---
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"Derrick" <de***********@hotmail.com> wrote in message
news:2%********************@news20.bellglobal.com. ..
Hello all;

I seem to be having some trouble serializing a class to XML. This code is
a cut & paste from a project which used it perfectly, but all of a sudden
I'm getting an error that the "dll ogerh_f6.dll or one of its dependancies
cannot be found". The class I'm serializing is quite simple, with a
couple of string properties marked with the XmlElementAttribute. The
class is marked with the Serializable attribute. As such, I don't believe
the class is the problem - as I mentioned, I've used this exact code
successfully before.

The code is blowing up when I try to create an instance of the
XmlSerializer class. I have no idea what the ogerh_f6.dll file is or
does. I searched Google for it to no avail.

Any idea where I should be looking?

The code and error is below.

Thanks,

Derrick

public void Save()

{

if(!Directory.Exists(settingsLocation))

{

Directory.CreateDirectory(settingsLocation);

}

using(TextWriter tw = File.CreateText(settingsLocation + settingsFile))

{

XmlSerializer xs = new XmlSerializer(typeof(ReaderHistory));
//Blowing up here

xs.Serialize(tw,this);

}
}
---
An unhandled exception of type 'System.IO.FileNotFoundException' occurred
in mscorlib.dll
Additional information: File or assembly name ogerh_f6.dll, or one of its
dependencies, was not found.
---


Fixed it....seems the class got modified to provide a Singleton instance,
thus having a private constructor. Changing the constructor back to public
fixed everything.

Derrick
Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.