Tips&Tricks - Helmut-Ortmann/EnterpriseArchitect_hoTools GitHub Wiki
Assortments of useful things for every day work with EA.
There are lot more great references and people who share their knowledge. Thanks to all of them.
- Review, use GUID to identify an EA item
- Use Glossary
- LINQ to SQL, the powerful environment for your Add-In in C#, VB, F# ((Database independent)
- LINQPad to interactive develop and test your EA query (Database independent)
Most EA developer fear it: EA can't find your precious Add-In and gives a meaningless error code. My ways are: Use a good example, run it, change it. For me a great help was:
- Deployment
- Add-In example
- EA Installation Inspector, by Adrian
- Non-admin installation of Add-Ins
- Tutorial: C# Add-In in 10 minutes, by Geert Bellekens
- Do everything once more, step by step (boring, I know, but sometimes it helps)
- Build all
- Update the product version (+1) in product.wxs
- Collect the dll registry information for all COM objects with WIX Heat (I have a little Collect.bat file)
- Update the file.wxs for all COM objects (between and with the by Heat collected information)
- Build all (don't forget!!!!)
- Deinstall (check if folder is really deleted)
- Install
Most errors are simple, and sometimes it looks as if they suddenly (hopefully) disappear.
- Be careful with letter case
- Be careful with changing the Assembly version of COM objects (every dll you register by EA)
- Changing Assembly version means you have to update the registry information for the dll
- Build, run Collect.bat, update file.wxs, Build, Deinstall, Install
- Make Add-In identification explicit with (C#, for all COM DLLs):
- [ComVisible(true)]
- [ClassInterface(ClassInterfaceType.None)]
- [Guid("58E7B70F-16C4-4538-A4E8-AF4EAC27519B")] // replace GUID with a new one
- [ProgId("AddInSimple.AddInSimpleClass")]
- In Visual Studio ensure that 'Register for COM interop' is checked
- If you use WIX Installer ensure thar the File entry is updated (harvest it and update file entry)
- Be careful in COM constructors (Exceptions don't show up, your dll isn't loaded and you have no clue why)
This may also happen when you DEBUG and use your Add-In. You are sure you have done everything right:
- Run Inspector V2, by Adrian
- If your Add-In is red:
- Take the GUID of the Add-In dll and delete all occurences in your registry
- Run regedit
- F3
- Search for GUID from your Add-In shown in Inspector
- Delete Key(s), all, or until Inspector V2 can't find your Add-In dll
- Install your Add-In or start debugging by building your application and
The root dll of your Add-In and every window you want to register by EA/COM is a dll and have to be registered as COM object. Usually every dll is in a Project. If you change the Assembly version you have to update the register information.
Non COM objects are easy: Just include them and update the version as you like.
If you experience strange error messages during debugging (out of memory,..):
- Select Enable native code debugging
If Visual Studion can't find your code: