Select to view content in your preferred language

ArcGIS API for Silverlight 2.3 - Duplicate ESRI.ArcGIS.Client.Toolkit classes ??

2415
4
11-27-2011 09:11 AM
Sampath_SriRanawaka
Emerging Contributor
Hi,
I downloaded new API for Silverlight 2.3 and included all dll's into my Silverlight project. I was not able to compile since classes in ESRI.ArcGIS.Client.Toolkit.Utilities are duplicated in both ESRI.ArcGIS.Client.WebMap assembly and ESRI.ArcGIS.Client.Toolkit assembly.

Can somebody explain why ESRI.ArcGIS.Client.Toolkit.Utilities is duplicated ?


The reason to this error is ESRI.ArcGIS.Client.Toolkit.Utilities classes appear in more than in one assembly. (In both ESRI.ArcGIS.Client.Toolkit and ESRI.ArcGIS.Client.WebMap)

Simple steps to recreate error are,
1. Create a new Silverlight project using Visual Studio
2. Add ESRI.ArcGIS  assemblies including ESRI.ArcGIS.Client.Toolkit Assembly and ESRI.ArcGIS.Client.WebMap Assembly into the project.
3. Include ESRI.ArcGIS.Client.Toolkit.Utilities namespace into source code and create a new object from one of the classes of ???ESRI.ArcGIS.Client.Toolkit.Utilities???, ex: CodedValueSources

Sample code:
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.Toolkit.Utilities;

namespace SilverlightApplication1
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();

            // Test code
            CodedValueSources codedValueSources1 = new CodedValueSources();
            ESRI.ArcGIS.Client.Toolkit.Utilities.CodedValueSources codedValueSources2 = new ESRI.ArcGIS.Client.Toolkit.Utilities.CodedValueSources();           
        }

    }
}
0 Kudos
4 Replies
DominiqueBroux
Esri Frequent Contributor
Likely you mixed some dll' coming from the previous version and some dll's from the new version.

Double check the version of the dlls referenced in your project and try to rebuild your project.
0 Kudos
Sampath_SriRanawaka
Emerging Contributor
Hi again,
Its not my error of referring old versions.
You may check this screen shot and see duplicates !!!!!!
0 Kudos
DominiqueBroux
Esri Frequent Contributor
OK. I got your point.

But, as you can see in the documentation, these classes are for internal use only and should not be used externally.
0 Kudos
Sampath_SriRanawaka
Emerging Contributor
Hi again,

OK, this makes a new question. Classes in ESRI.ArcGIS.Client.Toolkit.Utilities (ex: CodedValueSources, CodedValueSource, CodedValueDomain etc) are used to bind to a domain�??s coded values in a geodatabase in Version 2.2.
Please find the reference to ESRI example for that in here.

Question #1 : Classes in ESRI.ArcGIS.Client.Toolkit.Utilities appers in two assemblies and now they are asked to remove ESRI.ArcGIS.Client.WebMap from reference libraries. That�??s mean developers can not use ESRI.ArcGIS.Client.Toolkit.Utilities and ESRI.ArcGIS.Client.WebMap assemblies in a same project ?
Question #2 : Documentation of ESRI.ArcGIS.Client.Toolkit.Utilities assembly also mentioned that it for "*FOR INTERNAL USE ONLY*". So that mean these classes are not for external use. So then how we  to bind to a domain�??s coded values in a geodatabase as in version 2.2 ? There is no such a information found in release notes for 2.3
0 Kudos