Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Geert Bellekens on October 12, 2021, 05:33:05 pm

Title: Addins on EA v16 beta 64 bit
Post by: Geert Bellekens on October 12, 2021, 05:33:05 pm
I just installed the v16 beta, and found that my add-ins are no longer visible.

I'm guessing that is because of the 64 bit part.

The manual unfortunately doesn't tell me how to install a add-in on a 64 bit installation.: https://sparxsystems.com/enterprise_architect_user_guide/16.0/automation/deployingaddins.html (https://sparxsystems.com/enterprise_architect_user_guide/16.0/automation/deployingaddins.html)

I'll try some stuff if I find the time, but some documentation would be nice.

Geert
Title: Re: Addins on EA v16 beta 64 bit
Post by: Takeshi K on October 13, 2021, 08:08:27 am
Hi Geert,

We need to add an entry to:

HKEY_CURRENT_USER\SOFTWARE\Sparx Systems\EAAddins64
or
HKEY_LOCAL_MACHINE\SOFTWARE\Sparx Systems\EAAddins

for 64bit EA.

HTH,

Title: Re: Addins on EA v16 beta 64 bit
Post by: Geert Bellekens on October 13, 2021, 03:34:03 pm
HKEY_LOCAL_MACHINE\SOFTWARE\Sparx Systems\EAAddins64
Seems to work in getting EA to notice there is an add-in, but I get "Error - Missing (0x80040154)" for each of them.

These add-ins do work in the 32 bit version. Any tips?

Geert
Title: Re: Addins on EA v16 beta 64 bit
Post by: Takeshi K on October 13, 2021, 03:39:08 pm
Hi Geert,

If you use VisualStudio, please check whether CPU setting of the project is 'AnyCPU', not 'x86'.


Or, another possibility, you need to register by the following RegAsm. (if yours are .NET add-in)

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe

HTH,

Title: Re: Addins on EA v16 beta 64 bit
Post by: Sunshine on October 13, 2021, 04:16:54 pm
HKEY_LOCAL_MACHINE\SOFTWARE\Sparx Systems\EAAddins64
Seems to work in getting EA to notice there is an add-in, but I get "Error - Missing (0x80040154)" for each of them.

These add-ins do work in the 32 bit version. Any tips?

Geert
I've installed the 64-bit version of Sparx EA too on Windows 11 just to make it exciting.
I noticed that Office Integration MDG was missing.
Tried reinstalling but no luck.
Then tried adding Reg entry manually and got same error message.
Is there going to be a new Office Integration MDG released so its compatible?
Title: Re: Addins on EA v16 beta 64 bit
Post by: Eve on October 13, 2021, 04:46:16 pm
Yes there will be a new release of Office Integration. There may be a new version of Office Integration before we add 64 bit support to it. That decision hasn't been made yet.
Title: Re: Addins on EA v16 beta 64 bit
Post by: Geert Bellekens on October 13, 2021, 05:21:33 pm
Yes there will be a new release of Office Integration. There may be a new version of Office Integration before we add 64 bit support to it. That decision hasn't been made yet.
I was really hoping to get a hint from a Sparxian regarding the addins for v16 64 bit.
Do I need to send in a a bug report?

Geert
Title: Re: Addins on EA v16 beta 64 bit
Post by: Geert Bellekens on October 13, 2021, 07:36:12 pm
Changing the <PlatformTarget> in the .csproj files from "AnyCPU" to "x64" solved the issue for my add-ins.
I though AnyCPU would work for any CPU (both 32 + 64 bit) but apparently I was wrong. :-\

The annoying thing is that now my add-ins won't work on v15.2 (32 bit); Hmmm,  ??? Need to figure out a good way to handle this

Geert

Title: Re: Addins on EA v16 beta 64 bit
Post by: Sunshine on October 14, 2021, 07:47:35 am
Changing the <PlatformTarget> in the .csproj files from "AnyCPU" to "x64" solved the issue for my add-ins.
I though AnyCPU would work for any CPU (both 32 + 64 bit) but apparently I was wrong. :-\

The annoying thing is that now my add-ins won't work on v15.2 (32 bit); Hmmm,  ??? Need to figure out a good way to handle this

Geert
That doesn't line up with my understanding either so that sucks.

As a work around you might have to resort to doing two builds for 32 and 64 bit.
Title: Re: Addins on EA v16 beta 64 bit
Post by: timoc on October 14, 2021, 08:51:23 pm
Yes there will be a new release of Office Integration. There may be a new version of Office Integration before we add 64 bit support to it. That decision hasn't been made yet.
Will the new addin still require the Microsoft office interoperability package to be installed beforehand?
Title: Re: Addins on EA v16 beta 64 bit
Post by: Eve on October 15, 2021, 08:03:36 am
Changing the <PlatformTarget> in the .csproj files from "AnyCPU" to "x64" solved the issue for my add-ins.
I though AnyCPU would work for any CPU (both 32 + 64 bit) but apparently I was wrong. :-\

The annoying thing is that now my add-ins won't work on v15.2 (32 bit); Hmmm,  ??? Need to figure out a good way to handle this
I've seen the reverse before, where AnyCPU wouldn't load in 32 bit. I suspect the problem is that the register for COM Interop within Visual Studio only does one. Try explicitly registering the other way.
Title: Re: Addins on EA v16 beta 64 bit
Post by: Ian Mitchell on October 26, 2021, 07:06:11 pm
I just noticed that the set of Addins I have loaded - LemonTree, eaDocX and Model Expert, all see to appear OK in v16 beta1. Not that this helps you, but I'm pretty sure that I haven't done anything clever to make mine work in the 64-bit world...
Title: Re: Addins on EA v16 beta 64 bit
Post by: Geert Bellekens on October 26, 2021, 07:41:03 pm
Thanks for the input. I'll investigate further.

Geert
Title: Re: Addins on EA v16 beta 64 bit
Post by: Helmut Ortmann on November 08, 2021, 11:55:30 pm
Hello,

with VS2019 and WIX I can build, debug and run my AddIns for x86 and x64. Two WIX/VS installation projects which refer to the same code, the same WIX file definitions, compiled and build to x86 or x64. The work is doing VS2019 and WIX. EA loads the x86 or the x64 Addin. You may install both at the same time.

The differences are:
- Target x86/x64, settings in VS/WIX
- Change the path to the registration of AddIn
- Installation folder to distinguish x86/x64
- Give the Wix output in the two WIX setup-projects, a different name (MyAddin.msi and e.g. MyAddin64.msi)

The procedure:
Title: Re: Addins on EA v16 beta 64 bit
Post by: Geert Bellekens on November 09, 2021, 01:37:41 am
Thanks Helmut, looking forward to your update on Github so I can piggyback on that :)

Geert
Title: Re: Addins on EA v16 beta 64 bit
Post by: Helmut Ortmann on November 09, 2021, 07:27:56 am
Hello Geert,

I've updated GITHub (https://github.com/Helmut-Ortmann/EnterpriseArchitect_hoReverse/releases/tag/V3.20).

The WIX Setup projects:
- HoReverse_Setup
- HoReverse_SetupX64

In the accompanying files, you find the two *.msi files (x86+x64). Keep in mind the x64 Addin is only to show how it works.

If you have any questions or advice keep in touch.

Good luck and best regards,

Helmut

Title: Re: Addins on EA v16 beta 64 bit
Post by: Geert Bellekens on November 09, 2021, 04:11:55 pm
Thanks Helmut

Geert
Title: Re: Addins on EA v16 beta 64 bit
Post by: marc.zeller on June 15, 2022, 09:41:46 pm
Dear all,

I try to migrate my currently working Add-in to EA v16. But although I build the Add-in for x64, I still get as status "Error - Missing (0x80040154)". Is there anything else which must be updated from 32- to 64-bit?

Regards,
Marc
Title: Re: Addins on EA v16 beta 64 bit
Post by: Geert Bellekens on June 15, 2022, 09:48:33 pm
Marc,

Your dll should be registered for COM interop for both 32 as 64 bit.
If you use VS 2022 it will automatically be registered for 64 bit (if you check the Register for COM interop checkbox)
If you also want to register for 32 bit you need to add a command to the post build event

"%windir%\Microsoft.NET\Framework\v4.0.30319\regasm.exe" "$(TargetPath)" /codebase /tlb

Geert
Title: Re: Addins on EA v16 beta 64 bit
Post by: marc.zeller on June 16, 2022, 04:31:00 am
Hi Geert,

thank you. This solves the issue. Can this additional step also be included in a WiX based msi installer?

Regards,
Marc
Title: Re: Addins on EA v16 beta 64 bit
Post by: Eve on June 16, 2022, 11:35:13 am
https://stackoverflow.com/questions/567925/typelib-generation-and-installation-with-wix (https://stackoverflow.com/questions/567925/typelib-generation-and-installation-with-wix)

tldr - Run heat on your generated tlb file and include the resulting file in your installer.
Title: Re: Addins on EA v16 beta 64 bit
Post by: Geert Bellekens on June 16, 2022, 01:56:51 pm
You need some other bits and pieces for Wix.
I'm writing an article on that, but in the meantime you can look at what I'm doing for EA Toolpack:

https://github.com/GeertBellekens/Enterprise-Architect-Toolpack/tree/master/EAToolPack_Setup

Geert
Title: Re: Addins on EA v16 beta 64 bit
Post by: Ian Mitchell on July 07, 2022, 08:22:18 pm
@Sparx - is there a plan for you to create a 'Migrating your 32-bit addins to 64-bit' guide? Given that I suspect we all use Visual Studio, this shouldn't be too hard. I think this would be Sparx' best interests, as you probably want us all to move over to 64 bit, if that's the future.
Title: Re: Addins on EA v16 beta 64 bit
Post by: DeBAAT on July 10, 2022, 01:57:30 am
A very good suggestion Ian.
Especially since I still have issues getting eaUtils working  :(