Page 1 of 1

In VS2022 designer, I get "Object reference not set to an instance of an object."

Posted: Fri Aug 05, 2022 5:38 am
by 15691833
Dear Sir or Madam,

Yesterday I sent an e-mail to info@steema.com to inquire the reason why I cannot use TeeChart in Visual Studio 2022 designer.
When I try to use it, I get "Object reference not set to an instance of an object.".
I confirmed 3 points I got in advance.

1) I have run the TeeChart installer on the machine I am using
2) I run VS "As Administrator"
3) that a license is installed

(However I don't have x86 OS architecture, so I ran it in x64 OS architecture)

Still Teechart sends me an error "Object reference not set to an instance of an object." and does not work properly.

I am using:
・Steema Teechart for .NET 2012
・TeeChart.dll(Version:4.1.2012.2283), TeeChart.OpenGL.dll(Version:4.1.2012.2283)
・OS : Windows 11 (x64)
・Language : C#

Could you please anyone confirm if Teechart works properly under the condition I tried?
Thank you very much.

msg

Re: In VS2022 designer, I get "Object reference not set to an instance of an object."

Posted: Wed Aug 10, 2022 9:24 am
by Christopher
Hello,

apologies for the delay in our reply to you. Do you still have the Visual Studio project (*.csproj) you used to run your test with TeeChart? If so, could you please remove the binary files in the bin and obj directories, put it in a zip file, and post it here so I can test it here?

Re: In VS2022 designer, I get "Object reference not set to an instance of an object."

Posted: Wed Aug 10, 2022 11:14 am
by 15691833
Here is the project I ran before.

Thank you for your testing.

Best Regards,
msg

Re: In VS2022 designer, I get "Object reference not set to an instance of an object."

Posted: Wed Aug 10, 2022 11:55 am
by Christopher
Hello,

Thank you for your project. Just for your information, you can see in this image that your project works without a problem when deleting the references to TeeChart.dll and TeeChart.OpenGL.dll from your project and then adding in the latest NuGet package:
Screenshot from 2022-08-10 13-39-30.png
Screenshot from 2022-08-10 13-39-30.png (225.75 KiB) Viewed 8411 times
Screenshot from 2022-08-10 13-39-37.png
Screenshot from 2022-08-10 13-39-37.png (185.76 KiB) Viewed 8411 times
However, I see that you have an instance of the class InnerChart on the design surface of the Form:
Screenshot from 2022-08-10 13-53-15.png
Screenshot from 2022-08-10 13-53-15.png (27.02 KiB) Viewed 8411 times
Is this intentional? I ask because this class is essentially an internal class we use in the Tools namespace—the class which was designed to work on the design surface of a Windows Form is 'Steema.TeeChart.TChart'.

Re: In VS2022 designer, I get "Object reference not set to an instance of an object."

Posted: Tue Aug 16, 2022 1:41 am
by 15691833
I apologize for delaying the delaying of my reply.

Size of the file I would like to send you is too large to attach on my reply in Steema Forum,
so I reply with an E-mail to info@steema.com and attached the file on it

Thank you for your confirming.

Re: In VS2022 designer, I get "Object reference not set to an instance of an object."

Posted: Tue Aug 16, 2022 11:40 am
by Christopher
Hello,

yes, you're project works fine for me here:
Screenshot from 2022-08-16 13-26-41.png
Screenshot from 2022-08-16 13-26-41.png (60.58 KiB) Viewed 8079 times
I think you should run TeeRegV2010 which will install a valid license for your v2012 version of TeeChart on your machine. You can download this executable file from the Client Access link, and then click on Resources:
Screenshot from 2022-08-16 13-33-58.png
Screenshot from 2022-08-16 13-33-58.png (102.49 KiB) Viewed 8079 times
Download TeeRegV2010, and then run it and follow the instructions. If you log out of your Windows User account and then log back in again, this may resolve your problem for you.

Re: In VS2022 designer, I get "Object reference not set to an instance of an object."

Posted: Fri Aug 19, 2022 2:23 am
by 15691833
I downloaded and ran TeeRegV2010.
After running it, I can use TeeChart in VS2022.
Result.png
Result.png (172.67 KiB) Viewed 7876 times
I appreciate your support.