473,324 Members | 2,370 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Problem serializing class to XML

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
1 1679

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Angelos Karantzalis | last post by:
Hi guys. I've come across a problem when I tried to serialize a class into xml, only to discover that the parent class's XML Serialization properties weren't included in the output xml. ...
0
by: okinrus | last post by:
Can someone take a look at this code and figure out why Serializable_base::add_serializer throws std::bad_alloc. The problem seems to be the compiler because msvc++ 7.1 says...
1
by: Thomas | last post by:
Hi, I implemented a composite pattern which should be serializable to xml. After spending some time in the newsgroups, i finally managed serializing, even with utf-8 instead of utf-16, which...
1
by: dotnetnewbie | last post by:
Hi all I am new to .NET and webservice so I wish someone can shed some light on me. I have a Project class and a Product class, the Project can contain multiple Products (as an ArrayList). In...
2
by: Tobias Zimmergren | last post by:
Hi, just wondering what serializing really is, and howto use it? Thanks. Tobias __________________________________________________________________ Tobias ICQ#: 55986339 Current ICQ status: +...
7
by: Joe | last post by:
I've tracked the performance issue down to a single class. This class derives from CollectionBase and stores a basic value type such as string, int, double, etc... I also store the type itself...
15
by: Cesar Ronchese | last post by:
Hi, I built the sample code showing the problem with dates when viewed at different machines, different Time Zones and transported via Remoting. The zip can be downloaded here: ...
9
by: norvinl | last post by:
Hi, I'm serializing a class and using shared memory / deserialization to send it to other processes. I can serialize with one app and deserialize with another instance of the same app. But...
5
by: Nirdesh | last post by:
Hi, I am serializing a custom class holding some data for my project. This data internally contains a class which contains an event public delegate void MemberModifiedEventHandler(object...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.