nav-left cat-right

Visual Studio Tool: Order of class libraries(dll) initialization in Dynamics GP

I came across a post on Dynamics GP forum related to order in which Additional Menu items from multiple Visual Studio Addins are loaded. I decided to test this to figure out the order in which assemblies are initialized.

For testing, I created two GP addins – DynamicsGPAddin1 and DynamicsGPAddin2.

In both addins, I added simple code to display a message box during initializing process and added additional menu option for Customer Maintenance Window.


rmForm.AddMenuHandler(menu1, "DynamicsGPAddin1");



rmForm.AddMenuHandler(menu2, "DynamicsGPAddin2");


Idea was to check which message box is displayed first to determine the order in which assemblies are loaded. When I added both dlls in my GP folder order in which message box were displayed was DynamicsGPAddin1 and DynamicsGPAddin2.

The two possibilities that came to my mind were alphabetical order or by date modified (DynamicsGPAddin1 was compiled first).

Order of menu options visible in the Customer maintenance was also same.

To further isolate the order, I simply renamed my DynamicsGPAddin1 dll to DynamicsGPAddin3

Now, the order in which message boxes were displayed was reversed. Also, the order in which menu were displayed was reversed


This helped me to reach the conclusion that  assemblies in the addins folder in GP are loaded in the alphabetical order. It depends upon the name of dlls and not on the caption of the menu items.


4 Responses to “Visual Studio Tool: Order of class libraries(dll) initialization in Dynamics GP”

  1. Jivtesh says:

    Fantastic question, and very well explained. I guess if and when I launch a product, I should name the dll A1AwesomeTechnologies.dll

  2. [...] the original here: Visual Studio Tool: Order of class libraries(dll … – Dynamics GP Help VN:F [1.9.20_1166]Please wait while your rating is cast…Rating: 0.0/10 (0 votes cast)VN:F [...]

  3. Tina says:

    That’s an interesting finding. Nice post!!

Leave a Reply