Page 1 of 1

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

Posted: Wed May 10, 2006 4:28 pm
by 9637796
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

Posted: Thu May 11, 2006 9:55 am
by narcis
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.

Facing the same problem

Posted: Thu Oct 12, 2006 11:07 am
by 9638875
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

Posted: Fri Oct 13, 2006 11:23 am
by narcis
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.

Posted: Tue Oct 17, 2006 11:06 am
by 9638875
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

Posted: Tue Oct 17, 2006 1:13 pm
by narcis
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.

Posted: Tue Oct 17, 2006 2:01 pm
by 9638875
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

Posted: Tue Oct 17, 2006 2:58 pm
by narcis
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?

Posted: Tue Oct 17, 2006 3:07 pm
by 9638875
Hello Narcis,

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

br Christoph

Posted: Wed Oct 18, 2006 7:44 am
by narcis
Hi Christoph,

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

Thanks in advance.

Posted: Wed Oct 18, 2006 10:45 am
by narcis
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.

Posted: Wed Oct 18, 2006 2:43 pm
by 9638875
Hello Narcis,

when removing the mentioned code, it works

thanks
Christoph