我使用Enterprise Architect MDG技术创建了自己的工具箱。另外,我在C#中使用Microsoft Visual Studio创建了一个Addin,以添加该工具箱的一些功能。我想生成我所有作品的安装包。我使用SharpDevelop来解决这个问题,我创建了一个我的Addin的安装文件。
我不知道如何使用Microsoft Visual Studio生成我的工具箱文件(XML和mts)的.dll文件,SharpDevelop可以使用它来创建我的安装包。
实际上,我之前看过类似的东西,但设计师没有告诉我如何制作类似的东西。
答案 0 :(得分:2)
You do not need to generate a dll for your technology, just tell your packager to deploy the .xml file to a folder.
This is done the same way your dll is deployed, minus the generating the dll part. Here's a simple guide
If you want to deploy the technology to the user's environment:
Deploy your .xml to the %APPDATA%\Sparx Systems\EA\MDGTechnologies
folder (source)
If you want to import the technology to the model:
Deploy your technology file (xml) to a temporary folder, then load it into your add-in.
Use EA_OnInitializeTechnologies
Broadcast event to load your technology into the model
I should probably add that you should add a check for the MDG and its version before deploying it, since you don't want the technology to be loaded into the model every time a user opens the model.
Difference between deploying to the model and the user environment:
In the user environment, the technology will be available to the user for all models, unless disabled in specific models.
While if deployed to the model, all users will have access to the technology in that model. Even those that do not have the add-in installed.