Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Martin Aspeli on July 16, 2009, 12:55:48 pm
-
Hi,
I've built an add-in using Visual C# express. My bin/release folder contains:
MYCOMPANY EA.dll
MYCOMPANY EA.pdb
MYCOMPANY EA.reg
MYCOMPANY EA.tlb
MYCOMPANY_EA.dll
MYCOMPANY_EA.pdb
MYCOMPANY_EA.reg
MYCOMPANY_EA.tlb
I really don't know why I have both versions with underscore and with a space (the file sizes are different!). Looks like the underscore versions are the ones that are used, though.
To .reg file contains instructions to set up various things in HKEY_CLASSES_ROOT. It basically has everything I see in the registry, except the CodeBase key:
REGEDIT4
[HKEY_CLASSES_ROOT\MYCOMPANY_EA.Plugin]
@="MYCOMPANY_EA.Plugin"
[HKEY_CLASSES_ROOT\MYCOMPANY_EA.Plugin\CLSID]
@="{72A3C8EC-6836-3535-AF86-BB1FB99D7D0D}"
[HKEY_CLASSES_ROOT\CLSID\{72A3C8EC-6836-3535-AF86-BB1FB99D7D0D}]
@="MYCOMPANY_EA.Plugin"
[HKEY_CLASSES_ROOT\CLSID\{72A3C8EC-6836-3535-AF86-BB1FB99D7D0D}\InprocServer32]
@="mscoree.dll"
"ThreadingModel"="Both"
"Class"="MYCOMPANY_EA.Plugin"
"Assembly"="MYCOMPANY EA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
"RuntimeVersion"="v2.0.50727"
[HKEY_CLASSES_ROOT\CLSID\{72A3C8EC-6836-3535-AF86-BB1FB99D7D0D}\InprocServer32\1.0.0.0]
"Class"="MYCOMPANY_EA.Plugin"
"Assembly"="MYCOMPANY EA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
"RuntimeVersion"="v2.0.50727"
[HKEY_CLASSES_ROOT\CLSID\{72A3C8EC-6836-3535-AF86-BB1FB99D7D0D}\ProgId]
@="MYCOMPANY_EA.Plugin"
[HKEY_CLASSES_ROOT\CLSID\{72A3C8EC-6836-3535-AF86-BB1FB99D7D0D}\Implemented Categories\{62C8FE65-4EBB-45E7-B440-6E39B2CDBF29}]
To make the plugin work I also have to add HKEY_CURRENT_USER/Software/Sparx Systems/EAAddins/MYCOMPAY_EA with a default key of MYCOMPANY_EA.Plugin.
This works on my development machine, but I now need to deploy it to a number of other users. Here I'm a little lost.
I can create a .reg file to create the EAAddins entry, and run this + the generated file shown above. That still doesn't tell .NET where to find the DLL, though, as there's no CodeBase.
Where should I put the DLL file?
Do I need to run any .NET tools? The Sparx documentation refers to regsvr32, but this clearly doesn't apply to .NET/COM assemblies like this one.
Is there a better way?
Thanks,
Martin
-
You are looking for the "Assembly Registration Tool" regasm.exe
Look here: http://msdn.microsoft.com/en-us/library/tzat5yw6(VS.71).aspx for details.
Geert
-
The page in the help file regarding deployment of Add-Ins has been updated in the latest build (846) to better describe how to register an Add-In built using .NET.
If compiled as a .NET DLL, such as C# or VB.NET, register the DLL using the RegAsm command from the command prompt; for example:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe "C:\Program Files\MyCompany\EAAddin\EAAddin.dll" /codebase
-
Hi Aaron - is this information on the web somewhere as well?
-
There is a pdf version of the Help (including the topic Aaron quoted) on:
http://sparxsystems.com/bin/EAUserGuide.pdf
The UML Tool Guide web pages have not yet been brought up to date.