3 Replies Latest reply on Nov 3, 2016 6:32 PM by TrentHuhn

    Unable to access AF SDK namespace in custom application

    TrentHuhn

      We have a number of custom applications developed that heavily utilize the AF SDK library. Everything was working well until a few weeks ago when a support engineer had me upgrade my machine to AF Client 2016 R2 (2.8.5.7759) from AF Client 2016 (2.7.5.7166) to fix an unrelated issue (case #746763). After this upgrade, I started getting the following errors when compiling my existing code:

       

      The type or namespace name 'AF' does not exist in the namespace 'OSIsoft' (are you missing an assembly reference?)

       

      I was able to fix this by removing the existing reference to the AF SDK library (located in "C:\Program Files (x86)\PIPC\AF\PublicAssemblies\4.0\OSIsoft.AFSDK.dll") and re-adding it pointing to an old version of the DLL that was copied locally in an external project. However, this is not a sustainable solution, as that external project itself needs to be re-compiled. I have tried using the library in the 4.0 folder as well as the one located one level up (in the PublicAssemblies folder); neither of these seem to work.

       

      The runtime versions of both the previous library and the new one are listed as v4.0.30319. I have confirmed that I am targeting the .NET Framework 4.5 in all projects and that I have the appropriate 'using' statements in my code referencing the needed namespaces.

       

      Any ideas what might be causing this?