Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Debugging / July 2007

Tip: Looking for answers? Try searching our database.

BindingFailure on System...XmlSerializers  when debugging VB.NET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eric Peterson - 25 Jul 2007 22:20 GMT
When I debug my application, or any application that uses the DLL that uses
System.XML.Serialization.XmlSerializer, I receive the following exception...  
When running the compiled code, no exception and the code works fine.  Of
course, if i turn BindingFailure Exceptions off in VS Debugging, it does not
show the error.

BindingFailure was detected
Message: The assembly with display name 'MyDLL.XmlSerializers' failed to
load in the 'LoadFrom' binding context of the AppDomain with ID 1.
The cause of the failure was: System.IO.FileNotFoundException: Could not
load file or assembly 'MyDLL.XmlSerializers,
Version=1.0.2761.24591,    Culture=neutral, PublicKeyToken=d2591aaacdc55154' or
one of its dependencies. The system cannot find the file specified.  File
name: 'MyDLL.XmlSerializers, Version=1.0.2761.24591, Culture=neutral,
PublicKeyToken=d2591aaacdc55154'

System.XML is referenced in the MyDLL project.  What I don't understand is
why is it trying to load MyDLL.XmlSerializers when
System.XML.Serialization.XmlSerializers is implicitly referenced?

Any help would be greatly appreciated.  

Thanks,
Eric
John Saunders [MVP] - 26 Jul 2007 18:42 GMT
> When I debug my application, or any application that uses the DLL that
> uses
[quoted text clipped - 19 lines]
> why is it trying to load MyDLL.XmlSerializers when
> System.XML.Serialization.XmlSerializers is implicitly referenced?

MyDLL.XmlSerializers would be an automatically generated assembly containing
compiled XML Serialization code specific to your classes. This is so that
these classes don't have to be generated and compiled the first time they're
used. It also allows the serializers to be placed in the GAC and used in
different applications.
Signature

John Saunders [MVP]

Eric Peterson - 26 Jul 2007 18:54 GMT
Ah.  That makes sense.  

So do you have any idea how I rid myself of the Exception (short of turning
off the Exception notification on BindingFailure) which happens each time I
debug my code?

-Eric

> MyDLL.XmlSerializers would be an automatically generated assembly containing
> compiled XML Serialization code specific to your classes. This is so that
> these classes don't have to be generated and compiled the first time they're
> used. It also allows the serializers to be placed in the GAC and used in
> different applications.
John Saunders [MVP] - 27 Jul 2007 00:26 GMT
> Ah.  That makes sense.
>
[quoted text clipped - 3 lines]
> I
> debug my code?

In the debugger Exceptions dialog, there are two columns of check boxes. One
column is set to break immediately when the exception occurs, the second is
to break only if the exception is unhandled. Make sure you have the second
one checked and not the first.
Signature

John Saunders [MVP]


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.