#GPPT The type initializer for ‘Microsoft.Dexterity.Applications.root’ threw an exception

David Meego - Click for blog homepageWhile researching for the recent support case referenced in my earlier article, I identified another similar situation that I thought would be worth explaining.

In this example, we were receiving another Add-In Initialization Error when launching Microsoft Dynamics GP which was related to GP Power Tools and the WinthropDC.GpPowerToolsVB.dll or WinthropDC.GpPowerToolsVC.dll add-in.

Please note that a similar issue could be caused by any Dexterity product that also uses Visual Studio Tools addin dlls.

The Problem

The full error message displayed on launching Microsoft Dynamics GP was:

WinthropDC.GpPowerToolsVB.dll: The type initializer for ‘Microsoft.Dexterity.Applications.root’ threw an exception. InnerException: Specified argument was out of the range of valid values. Parameter name: productId

Below is a screenshot of the error message:


During the troubleshooting steps, we confirmed that if you removed or renamed (by changing the extension) of the WinthropDC.GpPowerToolsVC.dll and WinthropDC.GpPowerToolsVB.dll files in the Addins folder, that Microsoft Dynamics GP would launch without error.

However, once launched there was no sign of GP Power Tools on the menus or area pages.

The Cause

The cause of this issue was that the system was launching Microsoft Dynamics GP with a shortcut that pointed to a different launch file than Dynamics.set.

All Microsoft Dynamics GP dictionaries (both Microsoft created and ISV created) use chunk files that extract themselves when the Dynamics.set launch file is used. Part of the chunking process defines the name of the launch file to Dynamics.set.

During the GP Power Tools install, it silently extracts its GPPTools.cnk chunk file against Dynamics.set launch file to create the GPPTools.dic dictionary file.

If you look in the application folder you will see the dictionary file and if you edit the Dynamics.set launch file you will see GP Power Tools is installed.

The WinthropDC.GpPowerToolsVC.dll and WinthropDC.GpPowerToolsVB.dll files are installed into the Addins folder and are automatically loaded and initialized when Microsoft Dynamics GP starts up.

If you start Microsoft Dynamics GP using the Dynamics.set launch file, the GP Power Tools dictionary is loaded and when the add-ins initialize, they can find the dictionary objects they need and no errors are generated.

If you start Microsoft Dynamics GP using a different launch file that does not load the GP Power Tools dictionary, then you will receive errors when the add-ins attempt to initialize.

The Solution

To fix the issue you will need to ensure that both GP Power Tools and the Mekorma Product Manager dictionaries are manually added to the custom launch file. You can look at the Dynamics.set to get the settings to copy.

Note: Make a backup copy of the custom launch file before you edit it.

You will need to increment the number of products installed and then copy the Product ID and Product Name lines across. Then you will need to copy the 3 path lines for each dictionary into each set of workstation paths (usually only one set, by can be more).

GP Power Tools
Mekorma Products Manager

:C:Program Files (x86)/Microsoft Dynamics/GP/GPPTOOLS.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP/Data/GPPT_FRM.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP/Data/GPPT_RPT.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP/MEP7156.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP/Data/MEP7156F.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP/Data/MEP7156R.DIC

Moral: Please be aware that using custom launch files will require extra steps when installing or removing products.

Hope this helps


This article was originally posted on http://www.winthropdc.com/blog.

2 thoughts on “#GPPT The type initializer for ‘Microsoft.Dexterity.Applications.root’ threw an exception

Please post feedback or comments

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s