[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 815
  • Last Modified:

Updating Silverlight enabled WCF service cannot find System.Runtime.Serialization

I have a Silverlight Class Library that contains my objects.  I have added a reference to System.Runtime.Serialization to this project.  It's version 2.0.5.0, Runtime Version v2.0.50727, File version 4.0.50826.0.

My portal project contains a service that exposes the object in the class library.  

When I try to update the service reference in my Silverlight Application it gives me the following error:
Could not load file or assembly "System.Runtime.Serialization, Version 2.0.5.0 .... or one of it's dependencies.  The system cannot file the file specified.

It worked fine before I added the reference for System.Runtime.Serialization.  

My Portal project does not reference System.Runtime.Serialization, but other assemblies that are exposed by the same service due.  Some of them are not Silverlight class libraries so they reference the .Net Version 4.0.0.0 version.

How can I fix this error?
0
weimha
Asked:
weimha
  • 2
1 Solution
 
Imran Javed ZiaConsultant Software Engineer - .NET ArchitectCommented:
Hi,
Make sure you can view your service/wcf in browser.
It seems your service is not working properly.

Thanks
0
 
weimhaAuthor Commented:
I get the same error when I view the service in a browser.
0
 
Imran Javed ZiaConsultant Software Engineer - .NET ArchitectCommented:
it is a general error particularly when you have converted from 3.5 to 4.0,
there is a workaround but it may not be proper way, just add System.Runtime.Serialization file in bin if it is not there.
hope it may work, if it also do not work then add System.Windows from silverlight in bin and then check
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now