Skip to main content What is Dynamics 365? Guided tours Customer stories Try our products Build your own agents CRM ERP Sales Service Sales Customer Insights Customer Service Contact Center Field Service Supply Chain Management Commerce Finance Project Operations Human Resources Business Central Pricing Business application topics Training & certifications Migrate to the cloud Documentation Events Dynamics 365 Blog Product updates Onboarding and implementation Community Find a partner Software Development Companies Partner resources Microsoft Marketplace Product documentation Technical support On-premises product support Contact us Try for free Sign in
  • 1 min read

Error during Hotfix installation – “Version string portion was too short or too long”


Recently we had a problem when installing a Hotfix for AX 2009.
The installation stopped with an error and we could find the following information in the setup log:

=== Starting execution phase ===
Starting the Microsoft Dynamics AX Client executable: C:\Program Files (x86)\Microsoft Dynamics AX\50\Client\bin\ax32.exe "-regconfig=Ax2009myConfig" "-logdir=C:\Documents and Settings\All Users\Application Data\Microsoft\Dynamics AX\Dynamics AX Setup Logs\2009-10-21 12-37-06" "-startupcmd=autorun_C:\Documents and Settings\All Users\Application Data\Microsoft\Dynamics AX\Dynamics AX Setup Logs\2009-10-21 12-37-06\GetVersionInformation.xml"
Exception: System.ArgumentException

Message: Version string portion was too short or too long.

FullText: System.ArgumentException: Version string portion was too short or too long.
at System.Version..ctor(String version)
at Microsoft.Dynamics.Setup.InstallApplicationHotfix.ProcessVersionInformation(String logFilename, String versionFilename)
at Microsoft.Dynamics.Setup.InstallApplicationHotfix.FillHotfixUpdateFilesList()
at Microsoft.Dynamics.Setup.MainForm.DependencyValidation()
at Microsoft.Dynamics.Setup.MainForm.PreInstall()
at Microsoft.Dynamics.Setup.MainForm.s250Timer_Tick()

==== Setup encountered an unhandled exception and could not be completed. For details see the previous messages in the log. ===

What was the problem?

The important information was:

FullText: System.ArgumentException: Version string portion was too short or too long.

The AX Hotfix Installer is checking the AX version during the installation to ensure only valid fixes will be installed.

For this it is calling the following method within AX:

ApplicationVersion/BuildNo()

We then found out that this method has been changed so it returns also the build number of our customizations.

static SysBuildNo buildNo()
{
return ApplicationVersion::applBuildNo() + MyCustomization.myBuildNo();
}

The result of this change was that the method returned a string that was not expected by the AX Hotfix Installer and the Installer stopped with an error message.

We could finally solve the problem by removing the additional code.

static SysBuildNo buildNo()
{
return ApplicationVersion::applBuildNo();
}

Get started with Dynamics 365

Drive more efficiency, reduce costs, and create a hyperconnected business that links people, data, and processes across your organization—enabling every team to quickly adapt and innovate.