7 Replies Latest reply on Jun 11, 2012 11:15 PM by dlp

    Custom DR with dependencies?


      Hi All,


      I'am developing a Custom Data Reference wich need other dll (.net)  to make his work.


      Is there any way to use the "AF DR downloading to client" mechanism in order to deploy at the same time this other dll's to the client application?







        • Re: Custom DR with dependencies?

          Using regplugin, you can register support assemblies for a data reference with the /Owner option.  Support assemblies will be downloaded at the time the data reference assembly is downloaded.

            • Re: Custom DR with dependencies?

              I'm working on a video tutorial series about creating AF DataReferences. It's not finished yet, and not official 'released'. Here is the episode about managing and registering plugins:



                • Re: Custom DR with dependencies?

                  Thanks Chris and Michael (very nice videos).


                  I've tried to use the /Owner option and actually this register the DR and support assembly. I can see them in the AF Server Properties/Plugins tab. But the DR code can't find the support assembly at runtime.


                  Best regards.



                    • Re: Custom DR with dependencies?



                      Temporary DR assemblies at the client are downloaded (by default) to:


                      C:\ProgramData\OSIsoft\AF\PlugIns\# version\dara_reference.dll


                      An then inside the #version folder is created the directory structure included in the /directory option of the RegPlugInn.


                      What is the idea of this?


                      How should i use the RootDirectory and  Directory options?


                      how can i put my support assemblies in the same directory as my DR assembly ?







                        • Re: Custom DR with dependencies?

                          Any answer?


                          I don't want to use reflection to load the support assembly into de DR, so the only way i have is to get both assemblies in the same folder, any idea?

                            • Re: Custom DR with dependencies?

                              Hi Luis,


                              I was actually just having this problem this morning and was working on a more formal post about it.


                              it seems that regplugin registers support libraries with a directory structure, and client applications download them in the program data folder with this structure,


                              but when client applications use a custom plugin, they only look in the same directory for the supporting dll


                              I have come up with 2 workarounds for this so far:


                              manually go in to the C:\ProgramData\OSIsoft\AF\PlugIns\# version\ folder and cut the support library .dlls from the deeper directories and paste them just to the \# version\ folder with the plugin dll




                              when you use regplugin, run it from the compile output directory of the custom plugin and supporting libraries so that you dont have to use full paths.


                              ex: cd your command prompt to the compile output folder


                              C:\....\CustomPlugin\bin\Debug>“C:\Program Files\PIPC\AF\RegPlugIn.exe” /f customplugin.dr.dll supportinglibrary.dll /own:"customplugin.dr.dll" /p:Your-PI-System