Could not load file or assembly 'System.Runtime.Serialization, Version=2.0.5.0

3845
4
06-10-2010 09:03 AM
AngelGonzalez
Occasional Contributor II
I am just doing a simple SL app to just display a map. When I add the esri:PictureMarkerSymbol I get the following error when I build the solution:

"Could not load file or assembly 'System.Runtime.Serialization, Version=2.0.5.0, , Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified."

If I comment out the esri:PictureMarkerSymbol xaml I can build the solution without error.

Any clues?

I am using VS10, ESRI 2.0 API beta and the 3.5 .Net Framework.

Thanks


<UserControl x:Class="SL3.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:esri="http://schemas.esri.com/arcgis/client/2009"
            
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <UserControl.Resources>
        <DropShadowEffect x:Name="dropShadow" BlurRadius="10"   ShadowDepth="10" Direction="-45" Color="Black" Opacity="0.5" />
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" Background="White">
        <!---->
        <Grid.Resources>
            <esri:PictureMarkerSymbol x:Name="DefaultPictureSymbol" OffsetX="35" OffsetY="35"
                                      Source="Images/i_about.png" />
        </Grid.Resources>
0 Kudos
4 Replies
dotMorten_esri
Esri Notable Contributor
Add a reference to 'System.Runtime.Serialization'
0 Kudos
JackCibor
Occasional Contributor II
Add that reference to the code behind?? Or in the XAML?

Neither worked for me so I am doing something wrong. But figured that bit of info could help with debugging.
0 Kudos
AngelGonzalez
Occasional Contributor II
Add that reference to the code behind?? Or in the XAML? .



Neither, the reference is to be made in the Reference folder of your Visual Studio project. Right click on the folder and click on "Add Reference..."
0 Kudos
SaedShaar
New Contributor
Adding the refrence for 'System.Runtime.Serialization' solved the problem.

Enjoy!
Saed Shaar
0 Kudos