This is a migrated thread and some comments may be shown as answers.

Ambiguous Reference for ListSortDirection

7 Answers 231 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
chintan
Top achievements
Rank 1
chintan asked on 07 Jul 2009, 07:27 PM
Hi,

Recently we started using Q2 2009 controls so we have replaced the old binaries with the new one...

Now we have started getting an errors... "Ambiguous Reference for ListSortDirection"

The error is

Error    1    The type 'System.ComponentModel.ListSortDirection' exists in both 'c:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v3.0\system.dll' and 'd:\Chintan\CRM\10 - References\Assembly References\Referred\System.Windows.Controls.Data.dll'    C:\Documents and Settings\******\My Documents\Visual Studio 2008\Projects\SilverlightApplication1\SilverlightApplication1\MainPage.xaml.cs

If we remove the reference of System.Windows.Controls.Data.dll it asks to add the reference of this assembly and if we keep it then it shows ambiguous reference error.

Could you please help us to resolve this, actually we are trying to add the sortdescriptor following way and the error is on the line 12th

public partial class MainPage : UserControl 
    { 
        public MainPage() 
        { 
            InitializeComponent(); 
 
            RadGridView gv = new RadGridView(); 
 
            gv.SortDescriptors.Add(new SortDescriptor() 
            { 
                Member = "FirstName"
                SortDirection = ListSortDirection.Ascending 
            }); 
        } 
    } 

even i have uploaded the sample application on http://rapidshare.com/files/253138964/SilverlightApplication1.rar.html

the binary version is 2009.2.701.1020

Thanks,

7 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 08 Jul 2009, 05:56 AM
Hello,

These binaries are for Silverlight 2. Silverlight 3 will be available officially on 10 July and we decided to postpone our Silverlight 3 release for Q2 SP1. In the meantime you can use our latest official Silverlight 3 compatible binaries.

Best wishes,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Drew
Top achievements
Rank 1
answered on 13 Aug 2009, 04:50 PM
Hello,
I have installed Silverlight 3 and upgraded to yesterday's SP (08122009), but am still having this ambiguous reference problem for ListSortDirection. Am I doing something wrong?
Thanks,
Drew 
0
Vlad
Telerik team
answered on 14 Aug 2009, 05:16 AM
Hello Drew,

Most probably you have reference to the old System.Windows.Controls.Data - can you check this?

All the best,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Drew
Top achievements
Rank 1
answered on 14 Aug 2009, 12:44 PM
Yes, thanks. I resolved this yesterday. That was the problem. I was thrown off because the old version is still distributed with the Telerik Dlls in the Service Pack.

Thanks again.
0
Terry
Top achievements
Rank 1
answered on 19 Aug 2009, 01:17 AM
I'm getting the same error from the sample app.  Both the Silverlight system.dll and the Telerik dll are SL 3.0. See error message below.  I found that when i brought up the sample VS solution in VS2008 it needed to do a conversion.  I did a rebuild all, removed the VB examples, and ended up with the followiing errors.  How should I resolve them?

Thanks!

Error 6 The type 'System.ComponentModel.ListSortDirection' exists in both 'c:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v3.0\system.dll' and 'c:\Program Files\Telerik\RadControls for Silverlight Q2 2009\Binaries\Silverlight\System.Windows.Controls.Data.dll' C:\Program Files\Telerik\RadControls for Silverlight Q2 2009\Examples\GridView\Silverlight\SaveLoadSettings\RadGridViewSettings.cs 495 16 GridView.CS
Error 7 The type 'System.ComponentModel.ListSortDirection' exists in both 'c:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v3.0\system.dll' and 'c:\Program Files\Telerik\RadControls for Silverlight Q2 2009\Binaries\Silverlight\System.Windows.Controls.Data.dll' C:\Program Files\Telerik\RadControls for Silverlight Q2 2009\Examples\GridView\Silverlight\SaveLoadSettings\RadGridViewSettings.cs 501 16 GridView.CS
Error 9 Cannot implicitly convert type 'System.Windows.Controls.SelectionMode' to 'Telerik.Windows.Controls.SelectionMode'. An explicit conversion exists (are you missing a cast?) C:\Program Files\Telerik\RadControls for Silverlight Q2 2009\Examples\TreeView\FirstLook\Example.xaml.cs 34 36 TreeView.CS
Error 10 'SelectionMode' is an ambiguous reference between 'System.Windows.Controls.SelectionMode' and 'Telerik.Windows.Controls.SelectionMode' C:\Program Files\Telerik\RadControls for Silverlight Q2 2009\Examples\TreeView\FirstLook\Example.xaml.cs 34 36 TreeView.CS
Error 11 Cannot implicitly convert type 'System.Windows.Controls.SelectionMode' to 'Telerik.Windows.Controls.SelectionMode'. An explicit conversion exists (are you missing a cast?) C:\Program Files\Telerik\RadControls for Silverlight Q2 2009\Examples\TreeView\FirstLook\Example.xaml.cs 37 36 TreeView.CS


 
0
Vlad
Telerik team
answered on 19 Aug 2009, 05:41 AM
Hi Terry,

Please remove the reference to System.Windows.Controls.Data.dll to fix this.

Regards,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Terry
Top achievements
Rank 1
answered on 19 Aug 2009, 05:56 AM
That did it.  Thanks!
Tags
General Discussions
Asked by
chintan
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Drew
Top achievements
Rank 1
Terry
Top achievements
Rank 1
Share this question
or