I have a problem with PISDKClass(); It said "Interop type 'PISDKClass' cannot be embedded. Use the applicable interface instead." What should I do?
I suggest that you try setting the 'Embed Interop Types' property of the OSIsoft.PISDK reference to 'False', as follows:
I would also ask about your usage of the PI-SDK in this application. Is this an existing legacy application that you are maintaining? If not, I would strongly recommend that any new development that you do (or PI programming learning) should be done against the AF SDK, as the PI-SDK is now considered deprecated for development projects. There are many excellent resources in the PI Square community for getting started with the AF SDK, including New AF SDK guide for beginners.
As @John Messinger stated, PI SDK is targeted for deprecation. Sadly, King Mongkut's University of Technology Thonburi is teaching you an outdated and obsolete technology. And its a pity their own instructors do not provide support or assistance to you. John's PI-SDK is now considered deprecated link is most applicable. The link for the AF SDK Getting Started Guide may not help you since it focuses on asset related calls. As I write this, our Learning page is down but the more relevant guide would be a hands on lab from the 2014 Users Conference with the title "Migrating from PI SDK to AF SDK".
There is no class about PI in my year. I just learn it for my project and I don't know how to start. I don't know how difference between AF SDK and PI SDK. But after I read John comment I start with AF SDK and it's very worked. And for now my university teaches the juniors an AF SDK. Congrats to them.
Thank you for your answer it's very worked. I have followed your suggestion to develop my program with AF SDK and it's very good. It's more easier and there' re many sources to learn more than PI SDK.
Retrieving data ...