473,320 Members | 2,164 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,320 software developers and data experts.

XmlSerializer and assembly in GAC problem

Hi,

I'm trying to serialize a type contained in assembly referering to another assembly in GAC.
XmlSerializer xs = new XmlSerializer( typeof(TransferParentData ) );
The code above throws exception:

System.IO.FileNotFoundException : File or assembly name rng0i4ly.dll, or one of its dependencies, was not found.
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyNa me assemblyRef, Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence assemblySecurity)
at System.CodeDom.Compiler.CompilerResults.get_Compil edAssembly()
at System.CodeDom.Compiler.CompilerResults.get_Compil edAssembly()
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMap ping[] xmlMappings)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type)

When I set switch "XmlSerialization.Compilation" = 4 into application ..config I see in temp directory files with compiler log with error:
XCore.dll: error CS0011: Referenced class 'XCore.Data.Properties.PropertyBase' has base class or interface 'XCore.Data.Properties.IDataProperty' defined in an assembly that is not referenced. You must add a reference to assembly 'XCore.Shared'.

That is XCore.Shared.dll assembly in GAC. In case of web.application I can add <complier> entry under <system.web> telling that assembly should be taken from GAC. But my application is not WEB-based and I didn't find other similar switches.

Any ideas?

Vladimir.
Nov 12 '05 #1
1 5921
Sorry,
In web application this code doesn't work too in spite of added reference to
CAG assembly in web.config
"Vladimir Semenov" <ws******@hotmail.com> wrote in message
news:#X**************@TK2MSFTNGP12.phx.gbl...
Hi,

I'm trying to serialize a type contained in assembly referering to another
assembly in GAC.
XmlSerializer xs = new XmlSerializer( typeof(TransferParentData ) );
The code above throws exception:

System.IO.FileNotFoundException : File or assembly name rng0i4ly.dll, or one
of its dependencies, was not found.
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase,
Boolean isStringized, Evidence assemblySecurity, Boolean
throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyNa me assemblyRef, Boolean
stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence
assemblySecurity)
at System.CodeDom.Compiler.CompilerResults.get_Compil edAssembly()
at System.CodeDom.Compiler.CompilerResults.get_Compil edAssembly()
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMap ping[] xmlMappings)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, String
defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type)

When I set switch "XmlSerialization.Compilation" = 4 into application
..config I see in temp directory files with compiler log with error:
XCore.dll: error CS0011: Referenced class
'XCore.Data.Properties.PropertyBase' has base class or interface
'XCore.Data.Properties.IDataProperty' defined in an assembly that is not
referenced. You must add a reference to assembly 'XCore.Shared'.

That is XCore.Shared.dll assembly in GAC. In case of web.application I can
add <complier> entry under <system.web> telling that assembly should be
taken from GAC. But my application is not WEB-based and I didn't find other
similar switches.

Any ideas?

Vladimir.
Nov 12 '05 #2

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

Similar topics

2
by: Chris Aitchison | last post by:
Hello, I am attempting to have a class that I have written serialize so that it can be both passed as a parameter or return value for a webservice, and also be serialized to disk using the...
0
by: Magnus Lindhe | last post by:
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...
12
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....
3
by: Don McNamara | last post by:
Hi, I've hit quite a strange problem with XmlSerializer on my W2K3 server. When I serialize/deserialize using an exe on my local computer (XP), everything works fine. When I put the code out on...
4
by: BuddyWork | last post by:
Hello, When running the following line of code XmlSerializer serializer = new XmlSerializer(typeof (MyXmlTestClass)); I get the following exception message. An unhandled exception of
0
by: Philipp Sumi | last post by:
Hi all I have a strange situation with a VS.net Add-In that uses the XmlSerializer class for deserialization. In the code below, I pass a given type to the serializer class. However, the type of...
0
by: Gary | last post by:
Hi, there, I need to read an XML file. Actually it is AddIn file in XML format for Add-Ins in VS2005. The standard file is shown next. My task is to deserialize it, change some element, and...
0
by: awood45 | last post by:
I ran into a bizarre crashing of one of my programs earlier today, and noticed my IE 6 was messed up (maybe this is important, maybe it isn't, but it coincided with this not working). After fixing...
2
by: christopher.watford | last post by:
I'm loading a plugin assembly using Activator.CreateInstanceFrom, and inside this assembly is a settings class which gets serialized to XML. The general code flow is as follows: ObjectHandle...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.