15 Replies Latest reply on Mar 6, 2015 10:44 PM by dng

    How do I update the stringbuilder library?

    jorgewong

      I have a testing environment that was updated to the latest version of AF 2.6 but for some reason the string buidler dll wasn't updated to 2.6.1.6238.  OSIsoft.AF.Asset.DataReference.StringBuilder.dll

        • Re: How do I update the stringbuilder library?
          dng

          Hi Jorge,

           

          The String Builder plugins should come shipped with the PI AF Client. When you mentioned you upgraded to the latest version of AF, did you upgrade the AF server or the AF client?

          Also, where did you obtain the version of the string builder dll, did you find it under %programdata%\OSIsoft\AF\PlugIns on the client computer where you did the upgrade? If so, did you see other data reference plug ins (e.g. OSIsoft.AF.Asset.DataReference.PIPoint.dll) get updated to the upgraded version? (The latest AF client is 2.6.2.)

          • Re: How do I update the stringbuilder library?
            jorgewong


            We updated the AF server and client to the latest versions.  To find the version of the string builder I'm looking on the AF Server properties on the plug-ins tab.

              • Re: How do I update the stringbuilder library?
                dng

                Hi Jorge,


                If you right-click on String Builder on the Plug-Ins tab and select properties, can you let me know which version is the loaded version?

                2015-03-04 12_54_12-Data Reference Plug-In Properties.png

                 

                EDIT: Also, did you upgrade your AF Client first? Or AF Server first? What was the previous server and client versions before upgrade?
                If you want to confirm which plug-in version is loaded on PSE, you can use Process Explorer to look at the file path of the plug-ins (most likely %programdata%\OSIsoft\AF\PlugIns). You can then navigate to the dll and look at the version there (right-click > properties > details).

              • Re: How do I update the stringbuilder library?
                jorgewong


                Client was upgraded first and then server.  We have a dev, stage and prod environment.  Only our stage is not on the latest.  Here is the stage and the prod versions below.

                 

                stage_af.JPG

                 

                prod_af.JPG

                  • Re: How do I update the stringbuilder library?
                    dng

                    Hi Jorge,

                     

                    Thanks for the screenshot. It looks like the string builder plug-in you have on the stage environment is not an official version. Did you happen to develop and register a string builder plug-in before the 2.6 release? Was a beta version of AF installed on the stage environment? From the assembly version, it looks like a custom data reference, but I would need your input to confirm that.

                     

                    A few questions that I would like to verify:

                    - Do you see the same plug-in versions among all clients in the stage environment?

                    - On a client machine in the stage environment, if you navigate to %pihome%\AF and run regplugin -list, do you see the string builder plug-in? If so, what version is it? (a screenshot will be helpful)

                    - In %programdata%\OSIsoft\AF\PlugIns, do you see AFDRStringBuilder_VB.dll in the 1.0.0.0 folder?

                    - In %programdata%\OSIsoft\AF\PlugIns, do you see OSIsoft.AF.Asset.DataReference.StringBuilder.dll? If so, what version is it?

                    - In your PIFD database, if you look at the list of plugins under the dbo.PlugIn table, do you see String Builder there? If so, what is the typename for it?

                    - In your PIFD database, if you look at the list of assemblies under the dbo.Assembly2 table, do you see String Builder there? If so, what is the version?

                     

                    If the AFDRStringBuilder_VB.dll plug-in is registered on the AF server, we can unregister it using regplugin. If the OSIsoft.AF.Asset.DataReference.StringBuilder.dll plug-in is present on the SQL database, the client should be able to download it to the %programdata% directory. However, I am not sure how the AFDRStringBuilder_VB.dll got into the system in the first place, so I would like to determine that before picking a course of action.

                    • Re: How do I update the stringbuilder library?
                      David Hearn

                      It appears that you have a custom implementation of the String Builder DataReference on your stage server. If you notice, the assembly name is 'AFDRStringBuilder_VB.dll'. Since this is not a DataReference shipped by OSIsoft, it will not be upgraded. Since it has the same name as the one shipped by OSIsoft, then you could have problems selecting the correct DataReference. Probably the last one registered will have precedence.

                      1 of 1 people found this helpful
                    • Re: How do I update the stringbuilder library?
                      jorgewong

                      Answers to the questions below

                       

                      - Do you see the same plug-in versions among all clients in the stage environment? Yes

                      - On a client machine in the stage environment, if you navigate to %pihome%\AF and run regplugin -list, do you see the string builder plug-in? If so, what version is it? (a screenshot will be helpful) client_machine.JPG

                       

                      - In %programdata%\OSIsoft\AF\PlugIns, do you see AFDRStringBuilder_VB.dll in the 1.0.0.0 folder? Yes

                      - In %programdata%\OSIsoft\AF\PlugIns, do you see OSIsoft.AF.Asset.DataReference.StringBuilder.dll? If so, what version is it? Yes the one from dev and prod

                      - In your PIFD database, if you look at the list of plugins under the dbo.PlugIn table, do you see String Builder there? If so, what is the typename for it?

                      stage_pifd_plugin.JPG

                       

                      - In your PIFD database, if you look at the list of assemblies under the dbo.Assembly2 table, do you see String Builder there? If so, what is the version?

                       

                      pifd_assembly.JPG

                        • Re: How do I update the stringbuilder library?
                          dng

                          Hi Jorge,


                          If the plugin AFDRStringBuilder_VB is present in the plug-in table, you should see it under RegPlugIn -List as well. Can you try to unregister this version of string builder by running:

                               RegPlugIn /PISystem:<AF server name> AFDRStringBuilder_VB.dll /Unregister


                          Then reopen PSE to see if the OSIsoft.AF.Asset.DataReference.StringBuilder plug-in is loaded.

                        • Re: How do I update the stringbuilder library?
                          jorgewong

                          old-reference.JPG
                          The unregistering seemed to remove it from the cmd line listing but there is an old reference still in system explorer.  But for anything that may have been using that setting previously it looks like I'll have to do some cleanup on the templates

                           

                          unknown plugin.JPG

                          • Re: How do I update the stringbuilder library?
                            jorgewong

                            I'm a bit confused whats happening now.  I only unregistered that dll in stage and the following is what I see in stage vs. prod.  I feel like there needs to be cleanup in both.  Stage for the mappings and prod for the dlls.

                            Stage environment reference where it seems to work fine.  There are others that are broken

                            stage_af_reference.JPG

                             

                            Stage AF Server Properties

                            stage_af_server_properties.JPG

                             

                            Production AF Reference - Using a plug in that doesn't have a name but it works with no other broken mappings

                            prod_af_reference.JPG

                             

                            Production AF Server Properties

                            prod_af_server_properties.JPG

                             

                            Notice how production has some weird reference to some library with no name for building strings.  One other thing I noticed is that the dll I unregistered in stage exist in all environments.  I'm not sure how that's possible if it wasn't part of the AF server package.  We did an upgrade with a new server for the AF services, kept the existing PIFD SQL database and upgraded that.  According to the image below this is an OSI library.

                            afdrstringbuilder.JPG

                              • Re: How do I update the stringbuilder library?
                                David Hearn

                                Most likely this version was downloaded as a sample project from vCampus. PI AF 2014 (AF 2.6) was the first release where the StringBuilder DataReference was officially supported and shipped as part of the product.

                                • Re: How do I update the stringbuilder library?
                                  dng

                                  Hi Jorge,

                                   

                                  When a data reference is registered on an AF server, it remains in the PIFD database until it is unregistered. If the AFDRStringBuilder_VB.dll library has been registered to your production system before, it will remain in the system even after upgrade. It is likely that issues started happening now because the official OSIsoft.AF.Asset.DataReference.StringBuilder plug-in is introduced in 2.6, which has a name conflict (both "String Builder") with the AFDRStringBuilder_VB.dll.

                                   

                                  It looks like a clean up is the best way to move forward. You will want to unregister AFDRStringBuilder_VB.dll on your production system (and other affected environment) as well:

                                   

                                       RegPlugIn /PISystem:<af server name> AFDRStringBuilder_VB.dll -unregister

                                • Re: How do I update the stringbuilder library?
                                  jorgewong

                                  That makes a bit more sense now.  I see another library that also looks suspect.  "String Concat"  is that another one that should be unregistered?