Book a Demo

Author Topic: Sharing an Addin  (Read 6718 times)

Piqcked

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Sharing an Addin
« on: June 30, 2015, 08:14:39 pm »
Hello,

I have troubles sharing my C# Microsoft Visual Studio created Addin on another computer.

I have been following the steps I could find from help documents on the subject and I have created a script to automate the actions needed to share an addin which are :

1 ) Registering your add-in dll in the COM codebase entries in the registry using regasm.exe

2) Adding the registry key.

This is the code I am using in a batch file:

Code: [Select]
@ECHO OFF

REM DONNO
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe "C:\Users\user1\Desktop\Addin\bin\Debug\Jordan.dll" /codebase

REM Adding Register Keys :
REG ADD "HKCU\Software\Sparx Systems\EAAddins\Jordan" /ve /t REG_SZ /d Jordan.JordanClass

PAUSE

My dll seems to be registered, i only have this warning and it seems like the registering is still done.

"RegAsm : warning RA0000 : Registering an unsigned assembly with /codebase can cause your assembly to
 interfere with other applications that may be installed on the same computer. The /codebase switch
is intended to be used only with signed assemblies. Please give your assembly a strong name and re-r
egister it."


And my registry key is created with the right value.

But once I try to use the Addin in Enterprise Architect, I cannot see it in the EXTENSION tab. But it appears in the "Manage Addin" among the Addin list with an error :

Error - Missing 0x80040154

I cannot understand what I am doing wrong or what is missing for the addin to work, any idea ? What am I doing wrong ?

Thanks for your help.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Sharing an Addin
« Reply #1 on: June 30, 2015, 08:41:40 pm »
I've written an article about deploying add-ins which may help: Tutorial: Deploy your Enterprise Architect C# add-in with an MSI package

Geert

EXploringEA

  • EA User
  • **
  • Posts: 172
  • Karma: +8/-0
    • View Profile
Re: Sharing an Addin
« Reply #2 on: July 01, 2015, 04:59:29 am »
I also wrote a blog on the topic with a description of what bits need to be where you can find it at http://exploringea.com/2015/01/19/one-of-our-add-ins-is-missing/.

The utility I developed can be downloaded for free from the sparx community site.

Hope that helps



EXploringEA - information, utilities and addins

Piqcked

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Sharing an Addin
« Reply #3 on: July 01, 2015, 09:51:58 pm »
Thanks MrWappy, your tool is very useful !

I have discovered that my problem was that the GUID was already used for the assembly.

Piqcked

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Sharing an Addin
« Reply #4 on: July 06, 2015, 08:21:13 pm »
Ok so I have been on this Problem for over one week and it's really getting on my nerves.

I used this command :

Code: [Select]
@ECHO OFF

REM RegAsm
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe "C:\Windows\SysWOW64\ClassLibrary1.dll" /tlb:"C:\Windows\SysWOW64\ClassLibrary1.tlb" /codebase

REM Adding Register Keys :
REG ADD "HKCU\Software\Sparx Systems\EAAddins\MyAddin" /ve /t REG_SZ /d MyAddin.MyAddinClass

PAUSE

Everything is perfectly built, no error, I even have a "All types generated" message.

Then, I use EA Installation Inspector to check my Addin.



And I am missing the dll path.

So I went checking on regedit and there it is the result :



As you can see, I DO HAVE a path for the dll (codebase key). So why isn't it working ? Any ideas ?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Sharing an Addin
« Reply #5 on: July 06, 2015, 08:47:34 pm »
You didn't compile a 64 bit dll did you?
EA only works with 32 bit dll's.

Geert

Piqcked

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Sharing an Addin
« Reply #6 on: July 06, 2015, 10:22:40 pm »
I created my addin in x64 and it worked well on my Computer, but when i want to share it to my Team, they are not able to use it. They have the same OS and also x64
« Last Edit: July 06, 2015, 10:43:36 pm by Piqcked »