AnsweredAssumed Answered

Help: I am making a referencing to OSIsoft.AFSDK v4.0 so I can use PIServer object but....

Question asked by gortega on Mar 16, 2015
Latest reply on Jul 8, 2019 by rdavin

Hi all,

 

I have a ClassLibrary project that references to OSIsoft.AFSDK v2.0, but I need to use PIServer class, which is only available on version OSIsoft.AFSDK v4.0 , so I removed the reference to the dll. v2 and added a reference to v4, also I updated my project target .NET framework to 4.0, cleaned the solution and recompiled. but now I am getting several of this errors:

 

using OSIsoft.AF;

using OSIsoft.AF.PI;

using OSIsoft.AF.Asset;

 

The type or namespace name 'OSIsoft' could not be found (are you missing a using directive or an assembly reference?)

 

Also, several object such as PIServer, AFDatabase, AFElement, AFElementTemplates, etc throw the same error even if Visual Studio, is able to find the metadata source files when pressing F12.

 

 

I created a new Project and got same issue.  Again same code, but PIServer code related compiles just fine when referencing to AFSDK v2.

 

I appreciate any help.

Thanks,

 

 

Outcomes