Cannot open project form w/ charts and compile errors ...

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Mark
Newbie
Newbie
Posts: 13
Joined: Tue Jul 19, 2005 4:00 am

Cannot open project form w/ charts and compile errors ...

Post by Mark » Wed May 10, 2006 4:28 pm

Hello,

I have upgraded to the latest maintenance release and now my project will not open the form that has the tCharts and I cannot compile without errors. Here is the error that I get when I compile:

Error 8 The "GenerateResource" task failed unexpectedly.
System.Reflection.TargetInvocationException: Type in the data at line 317, position 5, cannot be loaded because it threw the following exception during construction: Unable to cast object of type 'System.Object[]' to type 'Steema.TeeChart.Styles.StringList'. ---> System.Xml.XmlException: Type in the data at line 317, position 5, cannot be loaded because it threw the following exception during construction: Unable to cast object of type 'System.Object[]' to type 'Steema.TeeChart.Styles.StringList'. Line 317, position 5. ---> System.InvalidCastException: Unable to cast object of type 'System.Object[]' to type 'Steema.TeeChart.Styles.StringList'.
at Steema.TeeChart.Import.Imports.DeserializeFrom(SerializationInfo info, StreamingContext context)
at Steema.TeeChart.Chart..ctor(SerializationInfo info, StreamingContext context)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at Microsoft.Build.Shared.ExceptionHandling.RethrowUnlessFileIO(Exception e)
at Microsoft.Build.Tasks.ProcessResourceFiles.ProcessFile(String inFile, String outFile)
at Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper log, ITaskItem[] assemblyFilesList, ArrayList inputs, ArrayList outputs, Boolean sourcePath, String language, String namespacename, String filename, String classname, Boolean publicClass)
at Microsoft.Build.Tasks.GenerateResource.Execute()
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode howToExecuteTask, Hashtable projectItemsAvailableToTask, BuildPropertyGroup projectPropertiesAvailableToTask, Boolean& taskClassWasFound) SDF Reader

Here is the error that I get when I attempt to open the form which includes the charts:

Unable to cast object of type 'System.Object[]' to type 'Steema.TeeChart.Styles.StringList'.
Hide

at Steema.TeeChart.Import.Imports.DeserializeFrom(SerializationInfo info, StreamingContext context)
at Steema.TeeChart.Chart..ctor(SerializationInfo info, StreamingContext context)


Help!

Thanks,
Mark

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu May 11, 2006 9:55 am

Hi Mark,

Could you please send us an example we can run "as-is" or let us know the steps we should follow to reproduce the problem here?

You can post your files at news://www.steema.net/steema.public.attachments newsgroup.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

gamed
Newbie
Newbie
Posts: 12
Joined: Fri Oct 21, 2005 4:00 am

Facing the same problem

Post by gamed » Thu Oct 12, 2006 11:07 am

Hi,

are there any fixed or workarounds for this problem. I recently upgarded from Teechart 2.0.2040.15119 to 2.0.2469.25745 (VS2005) and am unable to compile my project due to the above mentioned error.

I already tried to perform the steps mentiond to overcome this issue, but none of them works!

This would block from upgrading!!

regards Christoph

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Oct 13, 2006 11:23 am

Hi Christoph,

I'm afraid Mark never sent an example so that we could reproduce the proble m here and AFAIK no other customers reported that for now. Would you be so kind to send us an example we can run "as-is" to reproduce the problem here?

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

gamed
Newbie
Newbie
Posts: 12
Joined: Fri Oct 21, 2005 4:00 am

Post by gamed » Tue Oct 17, 2006 11:06 am

Hello Narcis,

the testcase is very easy to generate.
simply create a localizable form, pop a tee chart on it, (v 2.0.2040.15119) do some designer stuff (add series, etc). Save the Solution.
Open up with the new version of TeeChart. -> ERROR

What i additionally encountered is, that the error only occurs when the Form containing the TeeChart is Localizable. Maybe this helps.

br Christoph

p.s.: if you need my testcase i can send to you via mail

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Oct 17, 2006 1:13 pm

Hello Christoph,

It worked fine for me here following those steps:

1. I created a VS2003 application with a localizable form and the TeeChart version you mentioned.
2. I did some design-time changes to the chart and saved the solution.
3. Removed the TeeChart reference from the solution saved it and closed VS2003.
4. Removed project's bin and obj folders.
5. Re-opened VS2003 and the solution.
6. Added latest TeeChart for .NET v2 maintenance release as the TeeChart reference in the solution.

After proceeding like this worked fine here. Can you please test if this works for you?

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

gamed
Newbie
Newbie
Posts: 12
Joined: Fri Oct 21, 2005 4:00 am

Post by gamed » Tue Oct 17, 2006 2:01 pm

Hello Narcis,

as stated above I'm using Visual Studio 2005 and therfore cannot reproduce you steps.
Also I did not remove/reassign the reference of TeeChart.dll instead i set the SpecificVerion property to false.

br Christoph

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Oct 17, 2006 2:58 pm

Hello Christoph,

Thanks for the information. I tried to reproduce the steps you said with the latest maintenance release available (build 2.0.2469.25745) and worked fine for me here. Which TeeChart for .NE v2 build are you using?
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

gamed
Newbie
Newbie
Posts: 12
Joined: Fri Oct 21, 2005 4:00 am

Post by gamed » Tue Oct 17, 2006 3:07 pm

Hello Narcis,

i use exactly the same Version you mentioned above. Maybe i can send you my testcase via mail.

br Christoph

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Oct 18, 2006 7:44 am

Hi Christoph,

Yes please, post your example at news://www.steema.net/steema.public.attachments newsgroup.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Oct 18, 2006 10:45 am

Hi Christoph,

Thanks for the exampe. We could reproduce the issue here. The problem is a bug in v2.0.2040.15119. To solve it, in your project you select Form1.resx, right-click, select "View Code" and remove the base64 tag:

Code: Select all

  <data name="tChart1.Chart" mimetype="application/x-microsoft.net.object.binary.base64">
    <value>
               <!-- Content goes here -->
    </value>
  </data>
I'm going to attach your project modified in the newsgroups.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

gamed
Newbie
Newbie
Posts: 12
Joined: Fri Oct 21, 2005 4:00 am

Post by gamed » Wed Oct 18, 2006 2:43 pm

Hello Narcis,

when removing the mentioned code, it works

thanks
Christoph

Post Reply