PlugIns? (#2) - Instructions for deploying/installing a plug-in. (#211) - Message List

Instructions for deploying/installing a plug-in.

Hi,

I am trying to understand the rules for successfully installing/running a plug-in.

I have created an ILayerEditor3 Plugin in C# starting with the plug-in wizard template. I edited and ran the Registry.reg file to setup the Registry's FV Client Editor. I coded up what I need and I am then able to test/run in Debug mode through MS VS2005. Everything works great.

Next, I build a Release version and want to deploy to a user's PC with FalconView installed. I have a "Registry.reg" and a "MyOverlay?.dll". I would expect I need to copy the .dll into the same directory as fvw.exe and run the registry file. But that alone doesn't work.

How can I get my plug-in to run as a released plug-in on any PC?

I first tried doing a regsvr32.exe to register MyOverlay?.dll as described in the CompassRose? example but apparently that is only for C++ code? This put the PC in a messed up state after I also tried a regasm.exe.

I see randy.milbert's and jonwade's posts about the HelloWorldServer? where they did regasm.exe on the Interop.fvw.dll & Interop.MAPENGINELib.dll & the plugin's DLL. Also, they copied all those dlls to the same directory as fvw.exe.

Ok, it seems I need to regasm.exe "MyOverlay?.dll". Do you really have to regasm.exe the Interop.fvw.dll & Interop.MAPENGINELib.dll? Apparently so, but why? Aren't they part of the FV install?

How/why is my debug version working without doing a regasm.exe?

It would be nice to have a comprehensive post on how to get a "release" plug-in running specifying differences per language and environment.

Thanks, Phil

My Environment

Windows XP SP3
Falcon View Version 4.1.1.16
Microsoft Visual Studio 2005 Version 8.0.50727.42
Microsoft .NET Framework Version 2.0

  • Message #417

    I'm not a .Net expert but You need to run Regasm on your component to make it visible to COM. You also neet to be sure that the "set com visible" flag is set in your project.

    I suspect your debug version is working because it gets registered automatically as one of the Post Build steps in your project.

    You did not mention it but I assume you put an entry in the registry "Client Editors" key under HKLM/SW/PFPS/Falconview.

    One tip on debugging is to check the error log: %appdata%\missionPlanning\errorlog.txt

    If it fails to instantiate your com object it will report the error code.

    Chris

  • Message #443

    I have learned that the Interop’s do not need to be regasm’d. They should be local in your install directory and but do not overwrite anything installed in the fvw.exe directory.

    The real solution for installing and deploying a plug-in is to add a Setup Project to my Solution and add an Installer Class to my plug-in Project. And then code up my Installer Class to check for the next available Client Editor Registry key.

    This site gives a step by step for making a Setup Project:  http://www.simple-talk.com/dotnet/visual-studio/getting-started-with-setup-projects/

    For the C# Installer Class you do something similar to:

    ...
    using System.Runtime.InteropServices;
    using System.Configuration.Install;
    namespace MyPlugin
    {
       [ComVisible(false)]
       [System.ComponentModel.RunInstaller(true)]
       public class MyInstallerClass : Installer
       {
       ...
       // Containing some "override" declarations
       protected override void OnBeforeInstall(IDictionary savedState) {...}
       public override void Install(IDictionary savedState) {...}
       public override void Commit(IDictionary savedState) {...}
       public override void Rollback(IDictionary savedState) {...}
       public override void Uninstall(IDictionary savedState) {...}
       ...
       }
    }
    
  • Message #445
  • Message #561

    I ran across an interesting problem while installing new versions a plug-in. I am using a .NET installer class as I referenced above.

    I uninstall the plug-in using the *.msi. When finished I search the registry for anything referencing the plug-in. Nothing is found ... it looks to be completely removed. Then I install the newer version of that plug-in. It installs correctly.

    When I run the plug-in it is the old version running ... not the newly installed one!

    I do these same steps on a different PC and it responds as expected. Any ideas?

    • Message #562

      Problem solved. This was on a PC that I was trying the different install methods as described above. The problem was that the original MyPlugin?.dll that I copied into C:\PFPS\falcon\ was still there ... oops. I deleted it and now it works as expected.

Subscriptions