add symbol and System.Runtime.Serialization error

4693
5
01-07-2015 08:56 AM
MariaMaldini
New Contributor

hello , I am working on one of Esri silverlight samples that assign symbol for point features. when i add following codes to assign symbol to point layer :

            <esri:PictureMarkerSymbol x:Key="DefaultClickSymbol" OffsetX="11" OffsetY="39" Source="/Assets/images/i_pushpin.png" />

            <esri:SimpleFillSymbol x:Key="DefaultBufferSymbol" Fill="#660000FF" BorderBrush="Blue" BorderThickness="2"  />

i encounter with this error:

          

Error1Could not load file or assembly 'System.Runtime.Serialization, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.C:\TEMP\featureEditing - Copy\featureEditing\MainPage.xaml11featureEditing

and i added following references:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Net;

using System.Windows;

using System.Windows.Controls;

using System.Windows.Documents;

using System.Windows.Input;

using System.Windows.Media;

using System.Windows.Media.Animation;

using System.Windows.Shapes;

using ESRI.ArcGIS.Client;

using ESRI.ArcGIS.Client.Geometry;

using ESRI.ArcGIS.Client.Toolkit;

using ESRI.ArcGIS.Client.Toolkit.DataSources;

using System.Runtime.Serialization;

using ESRI.ArcGIS.Client.Bing;

using system.ServiceModel.Syndication;

using ESRI.ArcGIS.Client.WebMap;

i read different pages about this problem but i could not find any solution.

Is there anybody who can help me? thanks in advance

0 Kudos
5 Replies
DominiqueBroux
Esri Frequent Contributor

A reference to System.Runtime.Serialization has to be added manually to your project.

See an answer to a similar issue:  Re: Could not load file or assembly 'System.Runtime.Serialization, Version=2.0.5.0

MariaMaldini
New Contributor

in my first message, i mentioned the references in my program and System.Runtime.Serialization is added already.

but still i encounter with the mentioned error.

0 Kudos
MariaMaldini
New Contributor

actually i did not find System.Runtime.Serialization. i have just "System.Runtime.Serialization.Json".

11.png

0 Kudos
MariaMaldini
New Contributor

so i had to add System.Runtime.Serialization manually to code behind part. but as i told already it does not work and i face with mentioned problem.

using System;

using System.Collections.Generic;

using System.Linq;

using System.Net;

using System.Windows;

using System.Windows.Controls;

using System.Windows.Documents;

using System.Windows.Input;

using System.Windows.Media;

using System.Windows.Media.Animation;

using System.Windows.Shapes;

using ESRI.ArcGIS.Client;

using ESRI.ArcGIS.Client.Geometry;

using ESRI.ArcGIS.Client.Toolkit;

using ESRI.ArcGIS.Client.Toolkit.DataSources;

using ESRI.ArcGIS.Client.Tasks;

using ESRI.ArcGIS.Client.Bing;

using System.Runtime.Serialization;

using ESRI.ArcGIS.Client.WebMap;

using ESRI.ArcGIS.Client.Symbols;

0 Kudos
MariaMaldini
New Contributor

I found it . i was looking to find it in extensions tab.whereas it was in framework tab. thanks it solved.

0 Kudos