User (Legacy) Posted November 15, 2004 Report Share Posted November 15, 2004 I just upgraded to ChartFX/Windows Forms 6.2. Now whenever the user attempts to open the interactive properties dialog of a chart at runtime (by right-clicking on the chart, and selecting "properties"), I get a "Specified cast is not valid" error. My code hasn't changed. Also, if I revert back to the 6.0 dll's the problem goes away. I'd really like to move to the current version, but this is a show-stopper. Any suggestions as to what might be causing this error? Thanks, s.s. Link to comment Share on other sites More sharing options...
Software FX Posted November 15, 2004 Report Share Posted November 15, 2004 1) Have you downloaded the latest service pack for Chart FX 6.2 from our support site ? 2) Please create an application from the scratch using 6.2 and test whether this problem happens. -- FP Software FX Link to comment Share on other sites More sharing options...
User (Legacy) Posted November 15, 2004 Author Report Share Posted November 15, 2004 >Now whenever the user attempts to open the interactive properties >dialog of a chart at runtime (by right-clicking on the chart, and >selecting "properties"), I get a "Specified cast is not valid" error. I'm on the current version (AFIK). All of the dll's have a file version of 6.2.1754.xxxxx. I created a new Windows Form project from scratch, dropped a chart onto a form, and the problem still happens. Additional information: The problem only occurs Visual Studio .Net 2002 (I have both .NET 2002 and .NET 2003 installed on my Windows 2000 development machine). Also, the problem only occurs when attempting to open the properties dialog for the whole chart -- opening the properties dialog for a single series works just fine. Attached is a VS2002 solution that manifests the problem on my machine. Below is a stack trace: at SoftwareFX.ChartFX.UI.0J.CA() at SoftwareFX.ChartFX.UI.0J.OnVisibleChanged(EventArgs ev) at System.Windows.Forms.Control.SetVisibleCore(Boolean value) at System.Windows.Forms.Control.set_Visible(Boolean value) at System.Windows.Forms.TabPage.set_Visible(Boolean value) at System.Windows.Forms.TabControl.UpdateTabSelection(Boolean uiselected) at System.Windows.Forms.TabControl.OnHandleCreated(EventArgs e) at System.Windows.Forms.Control.WmCreate(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.TabControl.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) On Mon, 15 Nov 2004 09:50:50 -0500, in chartfx.net.winforms you wrote: >1) Have you downloaded the latest service pack for Chart FX 6.2 from our >support site ? > >2) Please create an application from the scratch using 6.2 and test whether >this problem happens. Link to comment Share on other sites More sharing options...
User (Legacy) Posted November 15, 2004 Author Report Share Posted November 15, 2004 After more testing, I believe this problem is related to having both versions of the .Net Framework installed. I asked two other developers to test my sample application from a previous post. One developer has never installed VS2003, the second developer has both VS2002 and VS2003 installed (as do I). And you guessed, it the problem only occurred for the second developer. Link to comment Share on other sites More sharing options...
User (Legacy) Posted November 15, 2004 Author Report Share Posted November 15, 2004 Yep, definitely related to having both versions of the framework installed. Under VS2002, if I use the app.config file to target *only* the 1.0 framework, the problem goes away. The easiest way to change the app.config file is to *first* use VS2003. This is because VS2003 has a feature (under Project Properties/Common Properties/Build) that allows you to specifiy what version of the framework to target, and then auto-magically makes the appropriate entries to the app.config file. Then, it's easy to copy the entries into the app.config file under VS2002. s.s. On Mon, 15 Nov 2004 19:45:47 -0800, Steve <NotDisclosed@cascadeaccess.com> wrote: >After more testing, I believe this problem is related to having both >versions of the .Net Framework installed. I asked two other >developers to test my sample application from a previous post. One >developer has never installed VS2003, the second developer has both >VS2002 and VS2003 installed (as do I). And you guessed, it the >problem only occurred for the second developer. > > > Link to comment Share on other sites More sharing options...
Software FX Posted November 16, 2004 Report Share Posted November 16, 2004 Ok. Great info. We will research this to see whether it is something we are doing wrong or it is the way it is supposed to be (making it necessary to use the config file). As a side note: The feature in VS2003 that allows you to link against different versions of the frameworks is not recommended by the Microsoft crew, they recommend you install both versions of Visual Studio instead, so I stay away from it. -- FP Software FX Link to comment Share on other sites More sharing options...
User (Legacy) Posted November 16, 2004 Author Report Share Posted November 16, 2004 On Tue, 16 Nov 2004 10:12:25 -0500, "SoftwareFX Support" <noreply@softwarefx.com> wrote: >Ok. Great info. We will research this to see whether it is something we are >doing wrong or it is the way it is supposed to be (making it necessary to >use the config file). > >As a side note: The feature in VS2003 that allows you to link against >different versions of the frameworks is not recommended by the Microsoft >crew, they recommend you install both versions of Visual Studio instead, so >I stay away from it. Yes, that is what MS recommends, and that's what I'm doing. I have both versions of Visual Studio installed, and I am compiling this app using VS2002. The problem is that under these circumstances the ChartFX components generate the "invalid cast" exception *unless* I use the app.config file to exclusively target the 1.0 Framework. Thanks for you help, s.s. Link to comment Share on other sites More sharing options...
Software FX Posted November 17, 2004 Report Share Posted November 17, 2004 I know that this is what you are doing and I was not blaming the problem on this. That's why I labeled my comment a "side note". I just though that it was a piece of information that you might want to have. Evidently it wasn't necessary as you already knew about it. Please disregard the whole "side note". -- FP Software FX Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.