473,503 Members | 2,142 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XmlSerializer and TypeLoadException

Hello,

I'm trying to deserialize an XML document into a objects with the
XmlSerializer which works fine in my NUnit test suit but fails with a
TypeLoadException in the server. The difference between the server and
the NUnit test suit is that the server will load the assembly
(Flux.Grease.Services.dll) as a plugin in its own AppDomain whereas
the NUnit test suit reference the assembly in the usual way.

The code that performs the deserialization reside in the
Flux.Grease.Services assembly and looks like this:

XmlSerializer serializer = new XmlSerializer(typeof(CitectExport));
citectExport = (CitectExport) serializer.Deserialize(reader);

The exception I receive is a InvalidOperationException and its
InnerException looks like this:

--------- Exception Data ---------
Message: Could not load type Flux.Grease.Services.Citect.CitectExport
from assembly Flux.Grease.Services, Version=1.0.1412.25430,
Culture=neutral, PublicKeyToken=null.
Exception Type: System.TypeLoadException
Source: u9n6cgik
StrackTrace: at Microsoft.Xml.Serialization.GeneratedAssembly.XmlS erializationReader1.Read33_CitectExport()
TargetSite: System.Object Read33_CitectExport()

Why can't the class Flux.Grease.Services.Citect.CitectExport be loaded
from the XmlSerializer generated assembly? How can I resolve this?

Any help appreciated, thanks.
Nov 12 '05 #1
0 1748

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1555
by: cody | last post by:
my problem is as follows: abstract class A { abstract Foo(); static Doit() { A = new B(); } }
5
5407
by: Stuart Robertson | last post by:
I am trying to find a solution that will allow me to use XmlSerializer to serialize/deserialize a collection of objects where a given object is shared between two or more other objects, and not...
12
8450
by: SJD | last post by:
I've just read Christoph Schittko's article on XmlSerializer: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxmlnet/html/trblshtxsd.asp . . . and very informative it is too....
1
4687
by: DC | last post by:
Hi, I am programming a windows service and all went well until I needed to use a simple array of chars which I initialize like this: char test = new char {'\x002F', '\x005E'}; Immediatly...
1
1618
by: @ndre | last post by:
Any type declaration of double leads to a TypeLoadException when run in cf (no compilation error), i.e. cf = reduced c# set??? see example below comments? @ndre this compiles with cf, but give...
0
1458
by: Tintax | last post by:
Hi All, I'm trying to create a generic node class for generating class hierarchies like XmlNode/XmlDocument. Unfortunately I'm running into an interesting problem where my code compiles fine but...
2
2571
by: Scott Wisniewski | last post by:
I am attempting to write a class to expose the STL map class to .NET languages as an IDictionary. As part of the implementation I created an implementation of IEnumerator that contains a pointer to...
0
1485
by: ryan groth | last post by:
Every three or four compiles I get a TypeLoadException everytime I run a web application on the same one or two dlls. The exception information is vauge, no file errors, no permission errors, no...
0
1355
by: Pierre-Alain Vigeant | last post by:
Hi, I'm getting a TypeLoadException inside an object that is located in a DLL that is dynamically loaded. I have this main program "main.exe" that dynamically load "main.dll" using o =...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7008
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7467
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5594
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5022
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
3168
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
746
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
399
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.