1 of 1 people found this helpful
Since the PI SDK assemblies are platform-specific, this error occurs when the project targets the generic platform of "Any CPU".
The easiest fix would be setting it to either 64 bit or 32 bit. If you compile your application to run as 32 bit (x86), it will still run fine on Windows x64.
Here are some good resources for your reference:
I would like to make sure that you are aware the the PI SDK is now deprecated.
If you are starting a new application I would highly recommend that you use the PI AF SDK instead. It can do everything (with very little things that are excusive to PI SDK: i.g. batches,MDB) the PI SDK can do and much more. It is also easier to use and more performant.
AF SDK reference can be found online here: AF SDK Library Reference
Hope this helps,
Thank you Anna! That solved my issue. And thank you for the reference articles, it helps me not make the same mistake