Author Topic: Help with deploying add-ins  (Read 11857 times)

GeertThijs

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Help with deploying add-ins
« on: March 31, 2018, 12:51:00 am »
After two days of trying I am unable to succesfully deploy my add-in. On starting EA I get the Missing (0x800401F3) error. I try to deploy the demo addin from Geert Bellekens (see https://bellekens.com/2011/01/29/tutorial-create-your-first-c-enterprise-architect-addin-in-10-minutes/). I know that there is a problem with the registration of the dll altough I succeeded to register the dll with regasm. I tried the 32bit build, the 64bit build, I checked the correct COM interop options, I tried several versions of regasm to adapt to my target .NET framework, I tried the EAinstallerinspector (which confirms that that there is a problem with the registration of the dll altough the registration with regasm seems to work: it says Types Succesfully Registered). Is there any systematic way to verify step by step what is wrong or do I really have to quit the addin path. I really need some extra functionality in the transformation templates to transform my class diagram to generate an xsd. Seems that I am not the only one with the problem but I tried almost all suggestions (apart from re-installing .NET and other desperate measures). Thanks.

Nizam

  • Prolab Moderator
  • EA User
  • *
  • Posts: 320
  • Karma: +15/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: Help with deploying add-ins
« Reply #1 on: March 31, 2018, 09:17:04 am »
It can be quite frustrating the first time around, You have tried most of the suggestions.
However these are the usual Gotchas
  • Entry in HKEY_CURRENT_USER Vs HKEY_LOCAL_MACHINE
  • Key - Default value of (project name).(class name)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13303
  • Karma: +557/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Help with deploying add-ins
« Reply #2 on: March 31, 2018, 04:59:21 pm »
Does it work on the machine you developed it?
(meaning you let your IDE register the classes?)

In that case I would not even bother with regasm, but go straight for the installer, which you'll need anyway to properly distribute your add-in.

In one of the other articles I explained the steps involved in creating an msi for your add-in.

Another problem we sometimes faced was a wrong entry in one of the registry keys.

This was posted as a response on another forum topic and helped quite a few people with install issues.

Quote
We have seen some strange problems like this when someone (or something?) has set a default value at the top of the HKEY_CURRENT_USER registry hive.

We have seen cases with other customers where something has set a value there it causes problems when EA tries to query the [HKEY_CURRENT_USER\Software\Sparx Systems\EAAddins] key.  For some reason when the key being requested does not exist, the Windows API returns whatever value was set at the top of HKEY_CURRENT_USER instead.

Try selecting the (Default) value directly under HKEY_CURRENT_USER, then Right-click | Delete it.  (not the HKEY_CURRENT_USER key itself, just it's default value).

The (Default) value should say (value not set) next to it.  If you see a different value, or a blank value, delete the (default).

Usual caveats apply here - be very careful when messing about in the registry or you may kill your Windows installation.

Geert

EXploringEA

  • EA User
  • **
  • Posts: 172
  • Karma: +8/-0
    • View Profile
Re: Help with deploying add-ins
« Reply #3 on: April 01, 2018, 05:02:07 am »
Hi,

The fact that the EAInstallationInspector identifies an issue is good news in that it can help identify where the problem is as it goes through the process of identifying the DLL that provides the class for your addin.

Looking at the Installation Inspector screen - left to right:

The first 3 columns relate to the sparx addin entries.
Col1: Name of the addin - is the name of the key in the Sparxs Addin entry (and location in the registry) - this is the name that you have created in the registry.
Col2: The area in the registry where the Sparx AddIn key is defined (has been found)
Col3: The class name is the value that you have set in the Sparx AddIn key value - and MUST match the class name in your DLL assembly Exactly.

The next 2 columns - identify the class ID
Col4: The location in the registry where the Class ID is found for the class - from Column3
Col5: The ClassID -

The next 2 columns - identify the DLL that provides the class
Col6: Location in the registry where the file reference for the DLL has been found
Col7: name of the DLL which provides the class

Depending on which columns have valid values will help identify where the problem could be.

You can double-click the entry to get a better presentation.

BTW: The InstallationInspector simply performs a manual process I went through all too often and simply checks:
1. What class is EA looking for?
- Is the class defined and matches the class definition in the DLL
2. Is this class defined? Is it public?
- You should be able to see the class in defined under HKEY_CLASSES_ROOT
3. Where is the DLL providing this class?
- Under the class entry - does it have a CLSID defined - normally under a WOW6432Node\Classes\CLSID entry..

I assume that you have built the DLL as a 32-bit DLL

If you post or send me the InstallationInspector screen shot (Press the button at the bottom of the app) and I'll give you a response.

BR

Adrian
EXploringEA - information, utilities and addins

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Help with deploying add-ins
« Reply #4 on: April 03, 2018, 04:52:57 pm »
Hi,

If you are using Visual Studio I've collected some advice at: https://github.com/Helmut-Ortmann/EnterpriseArchitect_hoTools/wiki/addin#visual-studio

Kind regards,

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

GeertThijs

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Help with deploying add-ins
« Reply #5 on: April 04, 2018, 12:44:49 am »
I got it working. That is: the addin now loads in EA at startup and the Hello World example from Geert works fine. I followed several hints in your responses so now I do not know exactly what the error was ::). I will start over again from scratch and verify and document. But for now: thank you all for your expertise.

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Help with deploying add-ins
« Reply #6 on: April 08, 2018, 07:36:58 pm »
Hi,

on https://github.com/Helmut-Ortmann/EnterpriseArchitect_hoAddinTemplate/wiki you find a running template for an Add-In in C#. This is a minimal Add-In with:

-  Gui in EA Add-In Window
-  Installation both as admin or as no admin install
-  Settings read from Settings.json
-  View Help, About, Settings
-  Reset to factory settings

With this template, you have a running starting point and you can add your own functionality. I developed it because every time I started writing an Add-In I ran into troubles. 

Best regards,

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Help with deploying add-ins
« Reply #7 on: April 08, 2018, 11:05:10 pm »
Hey guys,


Just FYI I've been working on a Visual Studio extension for EA Add-Ins, which I'm hoping to release in the next couple of weeks.

It's working, but I've asked Sparx for permission to use a version of their logo in an icon and I haven't heard back yet.
(If they say no, I'll just release it with a different icon -- there's no other Sparx IP in it.)

This is a Visual Studio extension and as such it is integrated into Studio. No copying, no fiddling, just hit New Project, fill in the details and you've got yourself a brand spanking new Add-In solution.
Once the solution's been created (takes a couple of seconds), you can build it immediately. If you run the resulting MSI installer, EA will pick up the Add-In (meaning it shows up in the Manage Add-Ins dialog) but of course it doesn't do anything because you haven't put any code in. :)

The template gives you all the event handlers, but nothing else: no menu handler, no About box, nothing.
This is because I don't want to make assumptions about or place constraints on how you structure your code or what features your Add-In should provide.

It's also not intended to help you understand how Add-In development works, or for that matter the intricacies of the Windows installer. It's a productivity tool for Add-In builders like myself.

If all goes to plan, this extension will be available through the Visual Studio Marketplace by the end of the month.


/Uffe
My theories are always correct, just apply them to the right reality.

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Help with deploying add-ins
« Reply #8 on: April 09, 2018, 04:36:06 am »
Hi Uffe,

great thing!!!!

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1365
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: Help with deploying add-ins
« Reply #9 on: April 11, 2018, 05:47:39 pm »
Hi Uffe,

Nice one. I look forward to testing it.

Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


McMannus

  • EA User
  • **
  • Posts: 108
  • Karma: +4/-1
    • View Profile
Re: Help with deploying add-ins
« Reply #10 on: April 13, 2018, 04:16:46 am »
@Uffe: Please don't forget to notify us somehow after release :-)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Help with deploying add-ins
« Reply #11 on: April 13, 2018, 08:04:28 pm »
Will do. I'm still waiting for Sparx to get back to me about the use of their logo, but I've given them a poke and we'll see what happens.

Meantime, there's always user documentation to write. :-\

/Uffe
My theories are always correct, just apply them to the right reality.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Help with deploying add-ins
« Reply #12 on: April 18, 2018, 12:09:52 am »
Update: I'm in communication with Sparx (on a 24-hour roundtrip). Use of their logo is an unequivocal No, so I'll need to redesign my icon. No biggie.

I'm more concerned about whether or not I'll be allowed to call the VS project type "EA Add-In," which seems to be prohibited by the legal guidelines.
I'm hoping they'll say Yes; if not, there doesn't seem to be much point in releasing this thing.

/U
My theories are always correct, just apply them to the right reality.

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1365
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: Help with deploying add-ins
« Reply #13 on: September 26, 2018, 12:28:21 am »
Hi Uffe,

Have you got an update on getting an EA Addin template available from VS?

Thanks,
Guillaume
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Viking

  • EA User
  • **
  • Posts: 433
  • Karma: +2/-2
    • View Profile
Re: Help with deploying add-ins
« Reply #14 on: March 21, 2020, 02:16:30 am »
I got it working. That is: the addin now loads in EA at startup and the Hello World example from Geert works fine. I followed several hints in your responses so now I do not know exactly what the error was ::). I will start over again from scratch and verify and document. But for now: thank you all for your expertise.

Maybe somebody is still interested in potential solutions.

I had the same problem: 0x800401F3.

I unchecked not needed referenced assemblies, in my case System.XML and System.Xml.Linq. Maybe they do not support 32-bit.