web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

D365 FO Build Error

(3) ShareShare
ReportReport
Posted on by 171
Hi,
 
I am getting the below error on .42 version of D365FO .
The error message is confusing , I have tried restarting the VM and building all the models, 
On Synchronization i will get the below error.
Does anyone has a clue on what should be the solution for this error.

Severity    Code    Description    Project    File    Line    Suppression State    Details
Error        The "BuildTask" task returned false but did not log an error.    C:\Program Files (x86)\MSBuild\Microsoft\Dynamics\AX\Microsoft.Dynamics.Framework.Tools.BuildTasks.17.0.targets    132        
Error        at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine..ctor(String metadataDirectory, String sqlConnectionString, SyncOptions options)            0        
Error        at Microsoft.Dynamics.AX.Metadata.Storage.MetadataProviderFactory.CreateRuntimeProviderWithExtensions(RuntimeProviderConfiguration configuration, TableExtensionLoader tableExtensionLoader, MenuExtensionLoader menuExtensionLoader, FormExtensionLoader formExtensionLoader, EnumExtensionLoader enumExtensionLoader, SecurityRoleExtensionLoader securityRoleExtensionLoader, SecurityDutyExtensionLoader securityDutyExtensionLoader, DataEntityViewExtensionLoader dataEntityViewExtensionLoader, EdtExtensionLoader edtExtensionLoader, ViewExtensionLoader viewExtensionLoader, QuerySimpleExtensionLoader querySimpleExtensionLoader, MenuItemDisplayExtensionLoader menuItemDisplayExtensionLoader, MenuItemActionExtensionLoader menuItemActionExtensionLoader, MenuItemOutputExtensionLoader menuItemOutputExtensionLoader)            0        
Error        at Microsoft.Dynamics.AX.Metadata.Storage.RuntimeDeserializer.DeserializeObject(BinaryReader reader)            0        
Error        at Microsoft.Dynamics.AX.Metadata.Storage.Runtime.RuntimeMetadataProvider..ctor(RuntimeProviderConfiguration configuration, Boolean extensions, ExtensionLoader`1 formExtensionLoader, ExtensionLoader`1 tableExtensionLoader, ExtensionLoader`1 enumExtensionLoader, ExtensionLoader`1 menuExtensionLoader, ExtensionLoader`1 securityRoleExtensionLoader, ExtensionLoader`1 securityDutyExtensionLoader, ExtensionLoader`1 dataEntityViewExtensionLoader, ExtensionLoader`1 edtExtensionLoader, ExtensionLoader`1 viewExtensionLoader, ExtensionLoader`1 querySimpleExtensionLoader, ExtensionLoader`1 menuItemDisplayExtensionLoader, ExtensionLoader`1 menuItemActionExtensionLoader, ExtensionLoader`1 menuItemOutputExtensionLoader, ExtensionLoader`1 workflowTemplateExtensionLoader, ExtensionLoader`1 workflowTaskExtensionLoader, ExtensionLoader`1 workflowApprovalExtensionLoader)            0        
Error        at Microsoft.Dynamics.AX.Metadata.Storage.MetadataProviderFactory.CreateRuntimeProviderWithExtensionsUpdated(RuntimeProviderConfiguration configuration, TableExtensionLoader tableExtensionLoader, MenuExtensionLoader menuExtensionLoader, FormExtensionLoader formExtensionLoader, EnumExtensionLoader enumExtensionLoader, SecurityRoleExtensionLoader securityRoleExtensionLoader, SecurityDutyExtensionLoader securityDutyExtensionLoader, DataEntityViewExtensionLoader dataEntityViewExtensionLoader, EdtExtensionLoader edtExtensionLoader, ViewExtensionLoader viewExtensionLoader, QuerySimpleExtensionLoader querySimpleExtensionLoader, MenuItemDisplayExtensionLoader menuItemDisplayExtensionLoader, MenuItemActionExtensionLoader menuItemActionExtensionLoader, MenuItemOutputExtensionLoader menuItemOutputExtensionLoader, WorkflowTemplateExtensionLoader workflowTemplateExtensionLoader, WorkflowTaskExtensionLoader workflowTaskExtensionLoader, WorkflowApprovalExtensionLoader workflowApprovalExtensionLoader)            0        
Error        at Microsoft.Dynamics.AX.Metadata.Storage.Runtime.RuntimeModelManifestProvider.Cache..ctor(IDictionary`2 archives, RuntimeProviderConfiguration configuration)            0        
Error        Log level - Error | Microsoft.Dynamics.AX.Metadata.Storage.MetadataReadException: Serialization version mismatch detect, make sure the runtime dlls are in sync with the deployed metadata. Version of file '209'. Version of dll '208'.            0        
Error        at Microsoft.Dynamics.AX.Metadata.Storage.Runtime.RuntimeModelManifestProvider..ctor(IDictionary`2 archives, RuntimeProviderConfiguration configuration, Boolean ignoreStrictSetting)            0        
Error        at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.Run(String metadataDirectory, String sqlConnectionString, SyncOptions options)            0        
Error        syncengine.exe exited with code -1.            1        


Thanks,
VK
 
Categories:
I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,146 Super User 2025 Season 2 on at
    Hi VK,
     
    Can you tell us what got changed before you start this synchronization? Was there a database copy where this environment was the target for a restore? If so, this can be caused by having different versions of Dynamics 365 F&O or customizations on the source and target environment. On what exact type of environment do you have this issue?
  • Suggested answer
    Saif Ali Sabri Profile Picture
    2,351 Super User 2025 Season 2 on at

    Your error message indicates a serialization version mismatch between the metadata files and runtime DLLs:

    📌 Error:

    "Serialization version mismatch detected, make sure the runtime DLLs are in sync with the deployed metadata. Version of file '209'. Version of dll '208'."

    This usually happens due to outdated or mismatched binaries after a platform update, incomplete build, or metadata corruption.


    🔹 Step-by-Step Fix

    1. Clean and Rebuild the Entire Solution

    Since your VM is already restarted, ensure a full rebuild:

    1. Close Visual Studio.
    2. Delete the "XppMetadata" and "Bin" folders from:
      makefile
      C:\AOSService\PackagesLocalDirectory
    3. Rebuild All Models
      • Open Visual Studio as Administrator.
      • Run Build > Clean Solution.
      • Then Build > Rebuild Solution.

    2. Synchronize the Database Manually

    If build errors persist, manually sync the database:

    1. Open Visual Studio.
    2. Open the Dynamics 365 Menu.
    3. Click "Synchronize Database" and select "Full Synchronization".
    4. Check for additional errors in the Build Output window.

    3. Run the Metadata Deployment Tool

    If the error persists, you need to redeploy the metadata correctly:

    1. Open a Command Prompt as Administrator.
    2. Navigate to the deployment scripts folder:
      bash
      cd C:\AOSService\PackagesLocalDirectory\Bin
    3. Run the following command to force metadata deployment:
      bash
      DeployMetadata.exe -sync
    4. Restart the AOS Service (iisreset /restart).

    4. Ensure Correct Platform Version Is Installed

    If your system recently received a D365FO update, confirm the platform version matches the binaries:

    1. Go to LCS > Project > Environment Details.
    2. Check the Platform version (e.g., 10.0.42).
    3. Compare it with the version in your VM:
      • Run:
        pgsql
        Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Dynamics\10.0' | Select-Object -Property Name, Version
      • Ensure the installed version matches your target version.
    4. If there’s a mismatch, apply the latest updates from LCS and rerun a full build.

    5. Reset the Local Development Environment (Last Resort)

    If none of the above steps work, resetting the local environment may be necessary:

    1. Open Command Prompt as Administrator.
    2. Run:
      axbuild.exe clean
    3. Restart the AOS Service:
      nginx
      iisreset
    4. Rebuild all packages and synchronize again.

    🎯 Conclusion:

    ✔ Clean and rebuild the solution.
    ✔ Manually sync the database in Visual Studio.
    ✔ Run DeployMetadata.exe to ensure metadata and binaries are in sync.
    ✔ Verify the platform version in LCS and the VM.
    ✔ Reset the local development environment if necessary.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 456 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans