27 October 2025

D365FO: "DVT script for service model" error while updating environment


Recent Microsoft updates for 10.0.45 started to fail on steps 60/61 with the "DVT script for service model" error while deploying the update package.


Solution:

  1. Open Event Viewer, go to Windows logs->Application

  2. Restart IIS (iisreset in Admin CMD prompt)

  3. Refresh events in Event Viewer, look for the last warning events in ASP .NET

  4. Check event details, it will look similar to the one below:

    Event code: 3008
    Event message: A configuration error has occurred.
    Exception information:
    Exception type: ConfigurationErrorsException
    Exception message: Could not load file or assembly 'System.Net.Http' or one of its dependencies. The system cannot find the file specified. (K:\AosService\WebRoot\web.config line 1300)


  5.  Edit the web.config, find the line from the error, comment the line using HTML comments <!-- --> and save your changes.

  6. Restart IIS to check that you get prompted for credentials while logging in to the D365FO. If yes - resume LCS update, it will pass now.

19 August 2025

D365FO: unable to install Windows updates

If you deployed cloud-hosted environments (CHE) last year, you probably noticed that many of them had issues with Windows update. When you try to search for the updates, the error appears: "We couldn't connect to the update service. We'll try again later, or you can check now. If it still doesn't work, make sure you're connected to the Internet."

The internet connection works fine, all required services are running, so the problem must be somewhere else.

The solution was found on Yammer, below are the steps how to fix the machine:

  1. Open a command prompt as Administrator and run:
    reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /f /v WinREVersion /t REG_SZ /d "10.0.20348.2201"

  2. Open a regedit, and navigate to HKLM/Software/Policies/Microsoft/Cryptography/Configuration/SSL/00010002

  3. Modify the "Functions" key to add the follow two ciphers to the end of the existing list:
    TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
    TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA256

  4. Restart the VM
After restart Windows will be able to find and install latest updates.

04 April 2025

D365FO: application version dropdown is empty when creating new configuration for UDE envrionment

Microsoft released D365FO UDE environments long time ago, still they are barely used by partners and customers. There are many reasons for that, one of them is multiple bugs.

Several days ago I decided to try UDE one more time and created a new test environment. Besides challenges with environment creation, I was not able to save newly created "local XPP configuration". There were no options in the mandatory "Application version" dropdown, so the new configuration could not be saved.


When I moved mouse over the "Application version" dropdown, the hint appeared saying that there is no database backup for Cross Reference.


The solution was to go to "Tools" -> "Options -> "Power Platform Tools" and uncheck "Enable auto setup for Dynamics 365 when using the Unified environment."

Then use "Tools" -> "Download Dynamics 365 FinOps assets" to get the backup file. After this the "Application version" dropdown will be properly populated when creating new local XPP configuration.

26 November 2024

D365FO: workflow editor could not be started

Several users reported the issue with D365FO workflow editor. During workflow editor startup the following error appears: "Application cannot be started. Contact the application vendor."


The fix is to open CMD as Admin, then execute the following command:

rundll32 dfshim CleanOnlineAppCache

27 October 2024

D365FO: "Object reference not set to an instance of an object" error while updating 10.0.39 on local Hyper-V machine

There is a known issue when you try to update D365FO Hyper-V machine with 10.0.39 by installing new D365FO update. You may get "Object reference not set to an instance of an object" error during installation.

The solution is to run the following PowerShell code, then retry installation.

#set Dynamics Deployment folderpath in registry and create folder structure $Installinfodir = "c:\Logs" Write-Host "Checking InstallationInfoDirectry in registry for path $($Installinfodir)..." -foregroundcolor Yellow if ((Get-ItemPropertyvalue HKLM:\SOFTWARE\Microsoft\Dynamics\Deployment -name InstallationInfoDirectory -ea 0) -ne $Installinfodir){ write-host "Changing DynamicsDeployment folder path in registry to $($Installinfodir)..." -foregroundcolor yellow Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Dynamics\Deployment -Name InstallationInfoDirectory -Value $Installinfodir -Type String } @('HotfixInstallationRecords', 'MetadataModelInstallationRecords', 'Runbooks', 'ServiceModelInstallationRecords') | ForEach-Object { if (!(test-path (Join-Path "$Installinfodir\InstallationRecords\" $_))){ New-Item (Join-Path "$Installinfodir\InstallationRecords\" $_) -ItemType Directory -force | out-null } }

More details here and here.

17 September 2024

Windows RDP: error connecting to remote VM while using correct credentials

I was trying to connect to a remote VM running Windows Server 2019 with correct credentials, got the following error:

An authentication error has occurred.
The credentials supplied to the package were not recognized

Found the solution here: just add "AzureAD\" to the username.

15 June 2024

D365FO: missing design elements in Financial Report Designer

Another possible issue with D365FO Financial Report Designer - missing design elements:


The solution is the following:

  1. Open CMD prompt in Admin mode

  2. Run the following command:
    rundll32 dfshim CleanOnlineAppCache

  3. Relaunch Report Designer

06 June 2024

D365FO: unable to run Financial Report Designer on 10.0.39

There is a bug in D365FO 10.0.39, impossible to open Financial Report Designer. The following error appears: "Unable to log in to <URL> or the login attempt has timed out. The application will exit."



The solution is to deploy latest D365FO quality update for 10.0.39 from LCS.

More details here.

27 February 2024

SQL: SQL71626 error during DB export to a bacpac file

Few days ago I got the following error while trying to export SQL database to a bacpac file:

Connecting to database 'AXDB_copy' on server 'localhost'.

Extracting schema

Extracting schema from database

Resolving references in schema model

Validating schema model

Validating schema model for data package

Validating schema

*** Error exporting database:One or more unsupported elements were found in the schema used as part of a data package.

Error SQL71626: The element Certificate: [cert_name] is not supported in Microsoft Azure SQL Database v12.



The fix is to open SQL Management studio, create database copy, expand "

<myDBcopy> -> Security -> Certificates" and delete all certificates. After this export copied database to a bacpac file.



30 January 2024

PowerShell: display truncated command output

Some PowerShell commands will truncate text data during output to the screen. For example,  'Get-AzContext' command will truncate 'Name' column. However, we need to know the full text from the 'Name' column in order to switch to the given context.

One of the solutions is to add '| format-table -wrap' option:

Get-AzContext | format-table -wrap

11 January 2024

D365FO: Visual Studio error when opening a project file

 In some cases you could get the following error when opening the Visual Studio project file:

Unsupported

This version of Visual Studio is unable to open the following projects. The project types may not be installed or this version of Visual Studio may not support them. 

For more information on enabling these project types or otherwise migrating your assets, please see the details in the "Migration Report" displayed after clicking OK.


The solution is to install (or re-install) D365FO VSIX Visual Studio add-in and make sure it is Enabled. You could get the latest version of the add-in by downloading service update deployment package from LCS and extracting it to a local folder. Then search for "Microsoft.Dynamics.Framework.Tools.Installer" under "DevToolsService\Scripts" folder.



30 August 2023

Visual Studio: unable to comment on code review with "closed by ()" message

I've seen a few times the following strange issue with new code reviews: when reviewer is trying to open newly created code review, he is unable to add any comments and there is a message displayed "closed by  ()":



The solution is the following:

  1. Close all Visual Studio instances
  2. Delete all files from this directory: 
    VS 2019: "%LocalAppData%\Microsoft\Team Foundation\8.0\Cache"
    VS 2022: "%LocalAppData%\Microsoft\Azure DevOps\8.0\Cache"
            and "%LocalAppData%\Microsoft\VisualStudio Services\8.0\Cache"

12 June 2023

D365FO: TempDB tables

In D365FO all types of temporary tables are automatically dropped by the system when the table variable in X++ goes out of scope. A TempDB table is not dropped in such case. You could see capabilities and limitations of TempDB tables here.

Sometimes there is a need to add more information to existing TempDB table, typical using event handling extensions or chain of command. In this case you may realise that the data you are adding is not saved/missing. This happens becase new data will be saved in a different TempDB table session and will not be visible by the code/form you are trying to extend.

The solution is to use a special linkPhysicalTableInstance() method to link current table instance with existing one.

Code example below:

    MyTempDBTable myTempDBTableCaller;
    
    public void init()
    {
        MyTempDBTable myTempDBTable;
    
        next init();

        myTempDBTable.linkPhysicalTableInstance(myTempDBTableCaller.cursor());        
        
        // insert more data to existing myTempDBTable session
        ...
    }
    


17 April 2023

D365FO: DBSync error 'The SQL view definition for your_view_name is deployed as a code package but has not been synchronized with the database'

 I got the following error today while doing the full DBSync:

The SQL view definition for your_view_name is deployed as a code package but has not been synchronized with the database. As it is currently used by one or more financial dimensions, the database must be synchronized to the code deployment.


The root cause of the issue was described in this Yammer thread by Denis Fedotenko a few years ago. Quote from the thread:

It looks like the problem is caused by the following code in the method DimensionEnabledType::getDimensionEnabledTypeCollection()
select firstonly RecId from sqlDictionary where sqlDictionary.name == any2Str(viewName);

The standard logic is trying to find whatever the view, to which the dimension definition refers, actually exists in the system. The problem is with the expression on the right side of the comparison in the select statement. Since it is not a variable with a defined length, the system cannot properly compile the statement; it creates a bunch of similar SQL Statements with different declared lengths of the only parameter. After execution of the code, my SQL Statement cache was thrashed with similar SQL Statements, which differs only in the string length in the parameter declaration, like:

(@P1 nvarchar(34))SELECT TOP 1  T1.RECID, T1.RECID FROM SQLDICTIONARY T1 WHERE( T1.NAME  =  @P1)

(@P1 nvarchar(25))SELECT TOP 1  T1.RECID, T1.RECID FROM SQLDICTIONARY T1 WHERE( T1.NAME  =  @P1)

(@P1 nvarchar(40))SELECT TOP 1  T1.RECID, T1.RECID FROM SQLDICTIONARY T1 WHERE( T1.NAME  =  @P1)

The problem is, that sometimes the length of the parameter declaration (like nvarchar(40)) does not match the length of the real string, so the passed parameter value is cut like:

<ColumnReference Column="@P1" ParameterDataType="nvarchar(40)" ParameterCompiledValue="N'BOSDimAttributesmmBusRelSalesDistrictGro'" />

The real name of the view is indeed BOSDimAttributesmmBusRelSalesDistrictGroup

I am not 100% sure now how to reproduce the error in  clean-room conditions, but I suspect that if the view name length is larger than 40 characters (or maybe if  it is larger than 40 chars and is equal to some magic numbers, on which the compiler chokes), the sync fails.

The solution depends on the length of your query name:

  • if query name is too long - rename it and make it shorter
  • if query name is not so long - just retry full DBSync, eventually it will succeed

06 March 2023

D365FO: missing menu item for running custom X++ scripts

Some time ago Microsoft released a new feature for running custom X++ scripts without having to go through Microsoft Dynamics Lifecycle Services (LCS) or suspend your system. According to the documentation, feature should be accessible via "System administration > Periodic tasks > Database > Custom scripts". In some cases this menu item is missing:


The solution is to run the following SQL query and restart IIS:

INSERT INTO SYSFLIGHTING (FLIGHTNAME, ENABLED) VALUES('AppConsistencyCustomScriptFlight', 1)

20 December 2022

D365FO: 'Serialization version mismatch detect' error

This error could happen during running DbSync, deploying a package (LCS or manually) or just starting up IIS. Error message looks like the following: 

Serialization version mismatch detect, make sure the runtime dlls are in sync with the deployed metadata. Version of file '204'. Version of dll '203'.

Versions could vary, but the file version is always higher then dll version.

The root cause of the issue is that your D365FO version is lower then the minimum version required by installed ISV solution as a binary model. 

There are two possible solutions:

  1. Delete binary model
  2. Update D365FO to the minimum version required by ISV solution



02 November 2022

D365FO: LCS error while creating first environment in a new project

The following error could appear when you try to create a new cloud hosted environment in a new project:

Lifecycle Services cannot perform the current {0} operation. Received null or empty value for parameter {1}. If the issue persists, please contact support with this Id: <guid>

The only way to fix this is to contact Microsoft support. They will update so-called S2S certificate, after that it will be possible to create new environments without an error.

23 September 2022

D365FO: error while trying to apply deployable package

The following error could appear when you try to apply deployable package manually on your Dev environment:

Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

That happens if you forgot to unblock the package Zip file before extracting.

The solution is simple - before extracting locate the file, open file properties and check Unblock checkbox:

16 August 2022

D365FO: workflow development and debugging

There are many guides in the internet how to create a new workflow in D365FO. The process is quite long and complicated.

Here are some of the tips to make it easier for you:

  1. If you stuck and not sure how to implement a specific part of a workflow - check Microsoft's workflows from Application Foundation model. Many good examples there.

  2. When you debugging the workflow, remember to attach your Visual Studio to the "Batch.exe" process, not to the default "iisexpress.exe", else no breakpoint will be hit

  3. The "Rejected" workflow action for some reason is handled by "denied" event handler (WorkflowElementDeniedEventHandler). All other actions (Started, Approved, Canceled, etc.) have event handlers with matching names.

07 July 2022

D365FO: WinRM certificate error while rotating SSL ceritificate

When cloud-hosted D365FO environment is deployed, SSL certificate is generated for accessing local IIS via HTTPS. This certificate will expire after some time and will trigger HTTPS errors when accessing local D365FO instance. SSL certificate could be regenerated via "Maintain" -> "Rotate secrets" menu. 

In some cases "Rotate secrets" task could fail with the following error: "Attempted to remotely execute a powershell script but the WinRM SSL certificate is expired. Please make sure the virtual machine [vm_name] has a valid WinRM SSL certificate before retrying."

Here is easiest way to refresh WinRM certificate:

  1. Login to the remote VM via RDP
  2. Open PowerShell prompt as Administrator
  3. Run the following command to install d365fo.tools, select "A" to install all modules when prompted:
    Install-Module -Name d365fo.tools

  4. Run the following command to refresh WinRM certificate:
    Invoke-D365WinRmCertificateRotation
Restart the VM and check if local D365FO instance could be accessed again without certificate error. If the issue still there - execute certificate rotation from LCS one more time, this time it will succeed.