How to use AFSDK?

I use PISDK to read and write tags,but it can not write multiple tags at once.

With AFSDK, Init C# code like

"PISystems myPISystems = new PISystems();"

the error code is

"

System.MissingMethodException

 HResult=0x80131513

 Message=Method not found: 'System.Security.AccessControl.DirectorySecurity System.IO.DirectoryInfo.GetAccessControl()'.

 Source=OSIsoft.AFSDK

 StackTrace:

  at OSIsoft.AF.Service.dcServerCommon.get_CommonApplicationDataPath()

  at OSIsoft.AF.PISystem.get_CommonApplicationDataPath()

  at OSIsoft.AF.Support.AFConfigSettings.get_ConfigFileFullPath()

  at OSIsoft.AF.Support.AFConfigSettings.Read(PISystemsGlobal systems, Boolean inLoad)

  at OSIsoft.AF.PISystemsManager.GetPISystems(Boolean forceNewInstance, String currentUserID, String currentUserName)

  at OSIsoft.AF.PISystemsManager.GetPISystems(Boolean forceNewInstance)

  at OSIsoft.AF.PISystems..ctor(Boolean forceNewInstance)

  at OSIsoft.AF.PISystems..ctor()

",

if somebody can tell me why?


image.png

Parents
  • Thanks.

    Current target is .NET 8.0. The version of Visual Studio is Community 2022.

    Perhaps I should use .NET framework 4.8 ?


    image.png
    If i want to write many values to multiple tags at once, any suggest for me ?

    Currently, my use of multi-link parallel writing seems to cause the target PI database to lag behind in processing, and when viewing with PISMT, the timing of the data will be delayed.

Reply
  • Thanks.

    Current target is .NET 8.0. The version of Visual Studio is Community 2022.

    Perhaps I should use .NET framework 4.8 ?


    image.png
    If i want to write many values to multiple tags at once, any suggest for me ?

    Currently, my use of multi-link parallel writing seems to cause the target PI database to lag behind in processing, and when viewing with PISMT, the timing of the data will be delayed.

Children
No Data