We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

exception after migrating from 7.3 to 9.1

Thread ID:

Created:

Updated:

Platform:

Replies:

99170 May 5,2011 12:23 AM UTC May 5,2011 12:15 PM UTC WinForms 1
loading
Tags: Tools
Alex Lerner
Asked On May 5, 2011 12:23 AM UTC

i have a working application which runs just fine with syncfusion 7.3. i have just upgraded to 9.1, and i am getting this exception:

System.InvalidCastException: Unable to cast object of type 'Syncfusion.Windows.Forms.Tools.XPMenus.XPMenusProvider' to type 'Syncfusion.Windows.Forms.IContextMenuProvider

So, same code, one set of libraries works, the other doesnt. here is the full stack trace

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Unable to cast object of type 'Syncfusion.Windows.Forms.Tools.XPMenus.XPMenusProvider' to type 'Syncfusion.Windows.Forms.IContextMenuProvider'.
at Syncfusion.Windows.Forms.MenuProviderFactory.CreateContextMenuProvider()
at Syncfusion.Windows.Forms.ScrollBarCustomDraw..ctor(ScrollersFrame owner)
at Syncfusion.Windows.Forms.HScrollBarCustomDraw..ctor(ScrollersFrame owner)
at Syncfusion.Windows.Forms.ScrollersFrame.InitializeComponent()
at Syncfusion.Windows.Forms.ScrollersFrame..ctor()
at Syncfusion.Windows.Forms.Grid.GridControlBase..ctor(GridModel model)
at Syncfusion.Windows.Forms.Grid.GridControl..ctor(GridModel model)
at Syncfusion.Windows.Forms.Grid.GridControl..ctor()



Jeraldes J [Syncfusion]
Replied On May 5, 2011 12:15 PM UTC

Hi Alex,

Thanks for your interest in Syncfusion Products.

This issue seems to appear when the project holds different framework and assembly reference in Application.

Please try the below given steps and let me know if this helps you

1) Open Dashboard.
2) Run the AssemblyManger with 'Removeallversion' option. This will remove all the Syncfusion assemblies from GAC and public assemblies folder.
3) If you found any Syncfusion assemblies in GAC and C:\Program Files\Syncfusion\Essential Studio\ \Assemblies\{FrameWork Version}folder. Please manually remove all the Syncfusion assemblies.
4) Run the AssemblyManager from the 9.1.0.20 Dashboard and install the {only required version} assemblies.
5) If your Target Framework is 4.0, then please remove 2.0 and 3.5 Syncfusion assemblies from GAC and Assemblies folder and vice versa.
6) Please ensure that only required framework assemblies are in GAC (c:\windows\assembly) and also in Assemblies folder (C:\Program Files\Syncfusion\Essential Studio\9.1.0.20 \Assemblies\2.0)
7) Open the 9.1.0.20 Dashboard.
8) Run the Multi Target Framework targeting to 2.0
9) Click OK once operation completed successfully.
( Also please try using Toolbox Configuration in Dashboard to install the Syncfusion Tools in the Visual Studio)

Also please try using below steps in upgraded projects.
10) Remove Bin and Obj folder from Project path
11) Open the Visual studio IDE and open the project
12) Remove and then add the references to 9.102.0.20
13) Rebuild your project.
14) Please check once again in the properties window that the Syncfusion assemblies are referring to 9.102.0.20 version.


Still this issue is not resolved please try to do the following steps.

1. Go to C:\Windows\Assembly and remove all the Syncfusion dlls versioned as .

2. Go to C:\Program Files\Syncfusion\Essential Studio\ \Assemblies and rename the 2.0 folder.

3. Go to C:\Program Files\Syncfusion\Essential Studio\ \precompiledassemblies\ and rename the 2.0 folder.

With these your machine will not pick the 2.0 assemblies hereafter.

4. Every time you make modifications to the code and before opening the designer, select save all in the Visual Studio File menu.


This will resolve the issue,

Please let us know if the issue still exists after following these steps,

Regards,
J Jeraldes




CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;