Page 1 of 1

System.IO.FileNotFoundException

Posted: Mon Oct 17, 2005 6:23 pm
by 8125470
Hi,

I am using TeeChart .NET Version 1.1.1879.21176.

The following error occurs 3 times when attempting to use Import.Template.Load(filename) on a chart for the first time.

A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll

Additional information: File or assembly name System.Drawing, or one of its dependencies, was not found.

The file definetly exists and is valid.

Any help would be appreciated?

Thanks

Vaughan

Posted: Tue Oct 18, 2005 7:24 am
by narcis
Hi Vaughan,

It works fine here using:

Code: Select all

			tChart1.Import.Template.Load(@"C:\Temp\Chart1.ten");
BTW: Please notice that latest v1 available is Build 1.1.2004.16592.

If you can't solve this problem could you please send us an example we can run "as-is" to reproduce the problem here? You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.

Posted: Tue Oct 18, 2005 9:52 am
by 8125470
Hi,

I should have mentioned that the code does actually load the file.

However, from the Debug > Exceptions... menu in VS.NET

Choose Break into the debugger for System.IO.FileNotFoundException.

Run the code and it will throw the exception 3 times.

Message "File or assembly name System.Drawing, or one of its dependencies, was not found."


It looks like this method attempts to find System.Drawing for whatever reason and cannot find it.
Interestingly I have noticed if I set the reference System.Drawing property : Copy Local = True, I no longer get the exception.


BTW: 1.1.2004.16592 has been tested here and it has an issue with distributing it, so I have to stick with this version.

Thanks anyway.

Posted: Wed Oct 19, 2005 4:52 pm
by 8125470
1.1.2117.41652

Have tested this issue again and it is still present in the new update.

Will this be fixed in the future?

Thanks,

Vaughan

Posted: Thu Oct 20, 2005 10:53 am
by narcis
Hi Vaughan,

We've been able to reproduce what you reported. We've also done some investigation and found that what causes the error is the method below when being called with System.Drawing assembly.

Code: Select all

return Assembly.LoadWithPartialName("System.Drawing").GetType(typeName);
Considering this I'm afraid there's nothing we can do here.

Any information

Posted: Fri Nov 04, 2005 4:01 pm
by 9088874
Hi Vaughan and Narcis

I get exactly the same error.

I tried the "CopyLocal = True" thing, but it did not help.

Can you suggest any workarounds?

Reg

Posted: Tue Nov 08, 2005 4:10 pm
by Chris
Hi,

I'm sorry, we've had a good look into this issue and have no workarounds to suggest. Please bear in mind that this issue only occurs in Debug and not Release builds.