I haven't found any related known issue in our database.But first have you changed the application to be able to run under Any CPU ?
Also one related setting I can think of is in PI System Explorer, under Notifications -> Tools -> Notification Settings -> Global Configuration -> Always Run Notification Service as 32-Bit. You can change the value to False and try again.
Are you compiling on 32 or 64 bit?
What is the target platform of your project (x86, x64 or any)?
What products and versions are installed on your development machine and on your 64-bit machine?
On the 64-bit machine, where is environment variable %PIHOME% and where %PIHOME64% pointing to?
Thank you both for your response.
Lingli, I have tried compiling to run under all different setups (Any CPU, 32-bit, 64-bit) but no avail. And unfortunately I noticed no improvement when changing "Run Notification Service As".
Gregor, I compiled on a 32-bit, targeting x66. The products and versions on both machines seem to be the same (Processbook, being 32-bit, is in the Program Files (x86) folder on the 64-bit machine, along with all SDKs).
I recently rebuilt the application from scratch on the 64-bit machine and it seems to work just fine (an OK workaround, I suppose). However, I am running into what I believe to be a similar issue when using an AFWrapper with Processbook on the 64-bit machine. The wrapper includes similar ANSDK code and when I attempt to run in Processbook, I receive the error:
"Could not load file or assembly 'OSIsoft.PIAnalytics.SDK, Version=1.0.777.0, [...] The system cannot find the file specified. "
Rebuilding the .dll from scratch on the 64-bit machine did solve the problem, and I have placed and referenced the PIAnalytics file in just about every place imaginable. I read on a seperate thread that uninstalling and reinstalling Processbook and the SDKs could potentially solve the issue, but wanted to wait and see if there are other options first.
With your latest answer you add a new measure which you hadn't mentioned before: PI ProcessBook.
Previously you were talking about a standalone application. Can you please elaborate a bit more about what you are doing? To understand what your issue might be we need a better understanding of what's involved.
If I am not mistaken, accessing 64-bit library functions and methods from a 32-bit application (like ProcessBook) is at least problematic. If you are creating a ProcessBook add-in, from your latest post I understand that this might be the case, I suggest compiling this add-in for 32-bit.
I apologize, the ProcessBook issue is a seperate from the standalone application (but caused by the same 32/64-bit crossover).
I have an Element Relative Display with a text box that essentially says whether or not there is an active notification for that element. I am using an Wrapper add-in on ProcessBook VBA to get access to my Notification Developer tools. This wrapper worked fine on my 32-bit machine, not so much on the 64-bit. I have compiled for "Any CPU" as well as "x86" (32-bit), yet neither have been fruitful. I am able to perform basic functions with the wrapper, simple "string in, string out", but when trying to access a function using ANSDK I receive the aforementioned "Could not load file or assembly..." error.
Could there perhaps be an issue with the version of the AF or AN SDKs? I don't see any 32-bit / 64-bit distinction between them in the download center, so I would imagine they should work fine for any compilation, but I'm grasping at straws...
Recently viewed this thread: http://vcampus.osisoft.com/discussion_hall/add_in_microsoft_development/f/11/t/532.aspx
Issue sounded somewhat similar so I uninstalled both versions of PI SDK and ProcessBook, then reinstalled ProcessBook with 32-bit PI SDK. Unfortunately, still experiencing the same issue.
Please verify that OSIsoft.PIAnalytics.SDK and OSIsoft.PIAnalytics.Common are in the .NET 3.5 GAC (C:\Windows\assembly) If they are both present in the GAC, did you uninstall/reinstall the 64-bit version of PISDK. The ANSDK uses PISDK to access history in some cases, so removing it could affect your ability to use the ANSDK (esp. ANNotificationList).
If PIAnalytics.SDK and PIAnalytics.Common are not installed in the GAC please reinstall the Notifications client feature from the install kit.
There are indeed platform specific components in both AFSDK and ANSDK however they are included in one install package which puts the appropriate bits on the machine.
Ah Michael you are brilliant. Turns out I was on quite the wild goose chase believing the error had to do with the version. The Notifications client had not been properly installed on this machine and therefore the PIAnalytics assemblies were not present.
I have reinstalled the client and everything is as it should be. Thank you everyone for your assistance.