Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Raya on December 03, 2018, 07:08:31 pm
-
Hello Everybody,
I tried to write a small C# Add-In near to the discription on https://bellekens.com/2011/01/29/tutorial-create-your-first-c-enterprise-architect-addin-in-10-minutes/.
For the new project I chose a .NET Standard Class Library and referenced the Interop.EA.dll as described. Then I appended the code and added the registry key.
The problem I had following the instrunctions were making the assembly COM-visible and Register for COM interop. I read that the Assembly Informations in Visual Studio 2017 can be found in the "Application" tab, but in my case the
"Assembly Information" button was missing. Furthermore the Checkbox "Make assembly COM-visible" is greyed out.
To solve this problem I added in the C#-sharp code " [ComVisible(true)]" to the class and " [ComRegisterFunctionAttribute]" but the Add-In doesn't work. In the EA "Manage Add-Ins" my Add-In has the Status "Error Missing".
Perhaps it was the wrong way choosing a .NET Standard Class Library, I'm really new in .NET developments.
For backround information: I'm using Visual Studio Community 2017, EA 14 on a Windows 10 system.
Thanks for help!
-
Hi Raya
You might want to download my example add-in from github (https://github.com/GeertBellekens/Enterprise-Architect-Add-in-Framework)to figure out what is different in your case.
From what you describe you are doing the right things, so the assembly information tab should be there.
I'm using exactly the same configuration as you, so that is certainly not the problem.
Geert
-
Hi Geert,
I compared my solution with yours and the problem seems to be that I chose the project as .NET Standard instead of .NET Framwork Class Library.
Now the Add-In works as expected.
Thanks for help!
Raya
-
Hi Geert,
I compared my solution with yours and the problem seems to be that I chose the project as .NET Standard instead of .NET Framwork Class Library.
Now the Add-In works as expected.
Thanks for help!
Raya
I have the same problem and cannot find where to choose the project type in "Blend for Visual Studio".....
-
Its confusing when they all have visual studio in the name isn't it.
The reason is that the instructions are for Visual Studio. Try Visual studio or Visual Studio Code (free version).
-
Another problem creating an Addin:
The registry key HKEY_CURRENT_USER\Software\Sparx Systems\EAAddins
does not exist in my installation of EA 15.0. There is no key called EAAddins at all. So where and how should I register my Addin?
-
You can always create the key if it doesn't exist.
Geert
-
You can always create the key if it doesn't exist.
Geert
Yes, but where does EA 15 look for the key?
It is not only the key that is missing but also a directory. Possibly EA15 expects the key in another place?!
-
Hi,
The AddIns key only gets created by Add-In installers, not by the EA installer. If it's there, EA scans it during startup; if not it doesn't.
But that only tells EA there are Add-Ins to look for. You must also register the Add-In DLL correctly so EA can actually load it.
/Uffe
-
Hi,
The AddIns key only gets created by Add-In installers, not by the EA installer. If it's there, EA scans it during startup; if not it doesn't.
But that only tells EA there are Add-Ins to look for. You must also register the Add-In DLL correctly so EA can actually load it.
/Uffe
Ok, thanks, it works now!