7 Replies Latest reply on Mar 25, 2013 12:03 PM by dhollebeek

    Toolbar could not be loaded


      I have a custom toolbar for Processbook that loads and works fine on two different machines in two different domains.  But I cannot get it to load in our corporate domain.


      I am using PI-Processbook v in Windows XP SP 3.


      The toolbar was built in C# from the OSI AddInPb_Toolbar_CS template.


      I register the toolbar using script file that generates the .reg file and mergers it with the registry.  Here it the registration file:




      [HKEY_LOCAL_MACHINE\Software\PISystem\PI - ProcessBook\Addins\CustomToolbar.Connect]
      "Description"="PSE Custom Toolbar"


      By checking the HKCR\CustomToolbar.Connect class in the Registry I can see the CLSID value which maps to the right location in the InprocServer32.CodeBase.


      As I am an administrator on the two other domains where the toolbar loads and works.  I thought I would get a administrator on the domain where the toolbar does not load to install it.  However, it does not load even when installed by an administrator.  (So it seems less likely to be a permissions issue.)


      I did find this link to a similar problem.  The poster indicated that he found the problem but did not share the solution.


      Can anyone tell me why this would work in two locations and not in the third?  Exactly what is Processbook looking for when it loads an Addin?



        • Re: Toolbar could not be loaded

          Hi David,


          When you tried to load it, any error come out please?


          Xi Wang

            • Re: Toolbar could not be loaded

              If you are trying to install on a 64-bit machine, you need to put your registry entries in  HKEY_LOCAL_MACHINE\Software\Wow6432Node since PB is a 32-bit application.



              • Re: Toolbar could not be loaded



                I get the following message:






                I indicated that I am using Windows XP SP3 in all three instances so it's not 64 bit.  But I will keep that in mind when I install it in Windows 7.





                  • Re: Toolbar could not be loaded

                    Hello David,


                    Can you please check if Technical Support knowledge base article KB00592 helps you solving this issue? If not, please consider opening a ticket at OSIsoft Technical Support.

                      • Re: Toolbar could not be loaded

                        We had exactly same error few days ago, in that case the issues we identified as:


                        1. On one machine there was a .Net version mismatch, had to install a newer .Net. Make sure your machine has the .Net version that you used for the plugin.


                        2. On the second machine we had to upgrade a Processbook version.


                        In our particular case the add-in was built for .Net 4.0 and only worked with PB 3.3 and higher.

                          • Re: Toolbar could not be loaded

                            Well, I gave up and started rebuilding the addin from scratch.  I took the OSI Template for toolbars (CS) and just created, built it, tested it on my development machine, added an installer project to the solution, compiled it and transferred it to my problem machine.  And it worked!


                            Note that all three of the machines I have tried this on are Windows XP sp3 with PB  They all have .Net 3.5 SP2.


                            So I started modifying the project a little at a time and then rebuilding it and testing it.  I altered the project to be able to support multiple buttons on one toolbar.  That worked.  In my addin I have a lot of forms and i wanted to be able to control certain aspects of the forms so I developed a template form and the other froms inherit from the template.  I also use bit maps (.bmp) for the button faces embedded in the .dll so no additional files are required.  After adding my inherited form (only one so far) and the bit map resource to the project I tested it again.  Now it fails.  But, not like before.  Now it appears to load the addin, but the addin doesn't show up.  I checked the toolbar configuration, but it doesn't show up in the list of available toolbars.  But when I check the Add-In manager, I can see my addin.  It's set to load on start up and it says it's loaded.


                            I went back and set the button face to text and tried it again... no go.


                            I went back again and removed the image resource from the project (and the .dll) and tried it again.  no go.


                            regarding Gregor's comment above.  I registered my addin using regasm.  I got a message indicating that using /codebase was for use only with signed code.  But it completed anyway.  I could not find the interop.PBSymLib.dll or interop.PBObjLib.dll files on my system.  The project uses OSIsoft.PBObjLib.dll and OSIsoft.PBSymLib.dll.


                            I'll try backing up some more next week.

                              • Re: Toolbar could not be loaded

                                One thing to check is the properties of OSIsoft.PBObjLib.dll and OSIsoft.PBSymLib.dll.  Every time you open a project, Dev Studio tries to find all references for a project and it doesn't always load them from the same place!  If the path property is not what you expect for these two references, delete them and re-add them from the correct place.  We get a lot of problems from this Dev Studio behavior in our office.