Page 1 of 1

Object reference not set to an instance of an object

Posted: Tue Jun 28, 2011 8:25 pm
by 9638860
Hi,
We use tchart.Net 2.0.2306.26231 in our application
On the development environment, where I have it installed, everything works fine.
But when I deploy my application and open the form which contains the tchart component, I get the following error message: “Object reference not set to an instance of an object.”
The error is coming from the line where a new instance of tchart is created. “this.tChart = new Steema.TeeChart.TChart();”

I’m deploying together with my app files the “TeeChart.dll”

Do I need to add any other dll? Or register any tchart related file?

I tried installing my tchart development pack in the deployment machine, and after that it works fine. But of course I can’t install it on clients machine… right?
Any suggestions on what I should do? Or what I’m doing wrong?
Also I created small application (just put on the form TChart component) and I had the same error.
But I Could see problem may into GetLicense method.

Thanks!
Monica A.

Re: Object reference not set to an instance of an object

Posted: Wed Jun 29, 2011 7:48 am
by narcis
Hi Monica,
Do I need to add any other dll? Or register any tchart related file?
This means the TeeChart license is not correctly compiled into your applications.
I tried installing my tchart development pack in the deployment machine, and after that it works fine. But of course I can’t install it on clients machine… right?
Yes, that's right. Otherwise you should purchase a developer license for each machine where you are installing a license.
Any suggestions on what I should do? Or what I’m doing wrong?
Yes, please follow the steps on this thread. Notice that for TeeChart v2 the designtime license key in the registry will be called DesignKeyV2.

Hope this helps!

Re: Object reference not set to an instance of an object

Posted: Wed Jun 29, 2011 5:31 pm
by 9638860
Thanks for the prompt reply!
I'm trying to follow the steps, but looking into the license.licx file I realized that the dll version (2.0.2306.26231) is different from the version described on the license.licx file generated by the tchart installation (2.0.2179.21171)... should it matter? is it supposed to be like this?

Thanks,
Monica A.

Re: Object reference not set to an instance of an object

Posted: Wed Jun 29, 2011 5:53 pm
by narcis
Hi Monica,

Yes, it should be the same version but you can remove the version number from licenses.licx and just leave the component part as shown in tutorial 17.