Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 233153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:04:37+00:00 2026-05-11T20:04:37+00:00

Here is my situation: I have a solution with three projects: 1) Silverlight App,

  • 0

Here is my situation:

I have a solution with three projects: 1) Silverlight App, 2) Silverlight Library, 3) the Asp.net-MVC Web App.

In the Silverlight Library I have a class called "MyClass". In the Silverlight App I serialize that class to XML using XmlSerializer and send the XML back to the database. I retrieve and deserialize that XML periodically in the Silverlight App to use MyClass.

My problem comes when I try to deserialize that XML from within the Asp.Net-MVC App. Inside the Asp.Net-MVC App this is the code I use to deserialize the XML to MyClass:

 MySilverlightLibrary.MyClassObjects.MyClass newMyClass = null;

 Assembly ass = Assembly.Load("MySilverlightLibrary.MyClassObjects");
 Type ty = ass.GetType("MySilverlightLibrary.MyClassObjects.MyClass", true);

 XmlSerializer theSerializer = new XmlSerializer(ty);

 if( !String.IsNullOrEmpty(xmlText) )
 {
    using( XmlReader sr = XmlReader.Create(new StringReader(xmlText)) )
    {                 
       newMyClass = theSerializer.Deserialize(sr) as MySilverlightLibrary.MyClassObjects.MyClass;
    }
 }  

This is the runtime error I get:

Server Error in ‘/’ Application.

Could not load file or assembly ‘System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e’ or one of its dependencies. The system cannot find the file specified.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: Could not load file or assembly ‘System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e’ or one of its dependencies. The system cannot find the file specified.

I noticed that the version of the "System.Xml" reference in the Silverlight Library project is 2.0.5.0, but the "System.Xml" reference is 2.0.0.0 in the Asp.Net-MVC App. I assume that this is likely the cause of the issue, but I can’t figure out how to fix it!

I have been messing with this for quite some time now and it’s driving me nuts! As always, any help would be greatly appreciated!

Thanks

Jeff

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T20:04:37+00:00Added an answer on May 11, 2026 at 8:04 pm

    You are correct – the cause of the problem you are having is the mismatched versions.
    I believe you can solve this with Assembly binding redirection.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is the situation: I have been called upon to work with InstallAnywhere 8,
Here's the situation: I have a label's text set, immediately followed by a response.redirect()
Here's the situation: we have an Oracle database we need to connect to to
Here is my situation: I have an application that use a configuration file. The
Here's the situation: We have some generic graphics code that we use for one
I have a very common situation here. And for years I haven't found if
Here's the situation. I have a webservice (C# 2.0), which consists of (mainly) a
Here is the situation. This small company I'm working with wants to have a
This is often situation, but here is latest example: Companies have various contact data
I have a solution with two relevant (to this question) projects, and a few

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.