Ax 2012 data upgrade in Tier-1 development environments(CHE). Error: System.IO.FileNotFoundException: Could not load file or assembly 'System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.

During the data upgrade from AX2012 to D365FO I got the following error in step 3 on /DataUpgrade/PreReqs/AdditiveDbSync:

System.IO.FileNotFoundException: Could not load file or assembly 'System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.

The workaround to solve the error was to copy the System.ValueTuple.dll file from "K:\AosService\PackagesLocalDirectory\bin\ModelUtilDlls" to "K:\AosService\PackagesLocalDirectory\bin"

There is a registered issue 1029905 on the LCS portal regarding this error.

Ax 2012 data upgrade in Tier-1 development environments(CHE). The status is in "In Progress" for a long time.

During the data upgrade from AX2012 to D365FO 10.0.42 version I faced an issue in step 3 (Post Sync\ExecuteScripts). The status was in "In Progress" for more than 12 hours. 

But when I checked the process, there were no pending post-sync scripts to run, and all post-sync script were completed.

I checked the status of the process with a query: select * from DBUPGRADE.SERVICINGSTEP

I decided to change the status of the «ExecuteScripts» step to complete it manually, since there were no pending post-sync scripts to run:

UPDATE DBUPGRADE.SERVICINGSTEP SET STATUS=2 WHERE PATH = '/DataUpgrade/PostSync/ExecuteScripts';

Then I closed the cmd window and re-ran step 3 but I got an error:

I closed the datupgradebatch.exe process using the task manager, re-ran step 3 and the data upgrade process was resumed and completed successfully.

Ax 2012 data upgrade on the self-service environment. The error "There is no row at position 0."

During the Ax 2012 data upgrade, after providing connection details to Ax2012 SQL Server, the migration tool closed and I received the following error message in the log file.

2025-08-17 13:15:09.261 -02:00 [Information] Reading version check query started. 
2025-08-17 13:15:12.199 -02:00 [Information] Executing the version check completed. 
2025-08-07 13:15:12.199 -02:00 [Error] There is no row at position 0. 
System.IndexOutOfRangeException: There is no row at position 0. at System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) at Microsoft.Dynamics.Servicing.DataUpgrade.AxConsoleApp.MenuHelper.
<EnvironmentSetup>d__17.MoveNext() in C:\__w\1\s\src\Migration.AxConsoleApp\Microsoft.Dynamics.Migration.AxConsoleApp\MenuHelper.

I spent some time understanding what had happened and was able to solve the problem by restarting the SQL and AOS services.

Dynamics 365 Finance and Operations Unified Developer Experience (UDE) environment. How to perform an IIS reset.

The fastest way to restart AOS Service in Unified Developer Experience (UDE) environment is to Start/Stop FO Online Debugger in Visual Studio.

I figured it out based on my experience, but later, I found some useful tips here: https://learn.microsoft.com/en-us/power-platform/developer/unified-experience/finance-operations-faq#stopping-debugging-restarts-the-runtime

Dynamics 365 Finance and Operations Unified Developer Experience (UDE) environment is unavailable. Error 502.

In some cases, the Dynamics 365 Finance and Operations Unified Developer Experience (UDE) environment may not be available, and returns:

Error 502
Gateway Request Id: be5bdd0b-0e8c-4479-bd57-a91a61123c56
Request Affinity: AOS1

Based on my experience, there are several options to fix this error:

  • Restart the services by switching the environment to Administration mode and then switching it back.
  • Deploy a model when this happens.
  • Wait for some time and it will come back online automatically.

D365 Finance and Operations. SysOperation Framework and Data Contracts.

Overview

The data contract is a class that is the parameter for the entry point to the class that performs the process. The SysOperation framework automatically creates a dialog from the data contract, which will use the EDTs in the contract to provide the label, and even drop-down lists based on the table reference on the EDT.

User interface

You can associate the data contract with the user dialog with the SysOperationContractProcessingAttribute

[
DataContractAttribute,
SysOperationAlwaysInitializeAttribute,
SysOperationContractProcessingAttribute(classStr(CustRecurrenceInvoiceUIBuilder))
]
class CustRecurrenceInvoiceDataContract implements SysOperationInitializable,SysOperationValidatable

or with the SysOperationContractProcessing

[
DataContractAttribute,
SysOperationAlwaysInitializeAttribute,
SysOperationContractProcessing(classstr(CustRecurrenceInvoiceUIBuilder)
]

When you add the parm methods to the contract class the field will be added to the user dialog.

[
DataMemberAttribute,
SysOperationLabelAttribute(literalstr("@SYS318853")),
SysOperationHelpTextAttribute(literalstr("@SYS318854")),
SysOperationDisplayOrderAttribute('1')
]
public TransDate parmFromDate(TransDate _fromDate = fromDate)
{
    fromDate = _fromDate;
    return fromDate;
}

[
DataMemberAttribute,
SysOperationGroupMemberAttribute(identifierStr(Statements)),
SysOperationControlVisibilityAttribute(false)
]
public RefRecID parmWorkOrderLineRecID(RefRecID   _lineRecID = lineRecID)
{
    lineRecID = _lineRecID; 
    return lineRecID;
}

From a technical perspective, data-contracts can implement different interface classes.

Class interfaces

SysOperationInitializable 

The main goal of this interface is to implement the contract initialization. If you want to initialize the default parameters in run time before the UI interface is displayed to the user, you need to implement the SysOperationInitializable class.

class EAMWorkOrderAddNoteDescriptionContract implements SysOperationInitializable

In this case method "initialize" will be available and can be rewritten. This method is used to initialize variables within the data contract. However, this method is called if no user usage data is found.

public void initialize()
{
    this.parmFromDate(DateTimeUtil::getSystemDate());
}

In case the method "initialize" must be called at any time you have to add the SysOperationAlwaysInitializeAttribute to your contract.

[
DataContractAttribute,
SysOperationAlwaysInitializeAttribute,
SysOperationContractProcessingAttribute(classStr(CustRecurrenceInvoiceUIBuilder))
]
class CustRecurrenceInvoiceDataContract

In addition, if you want to clean up the field value on the dialog, it is required to add the same SysOperationAlwaysInitializeAttribute attribute to the desired method:

[
DataMemberAttribute,
SysOperationAlwaysInitializeAttribute,
SysOperationLabelAttribute(literalstr("@SYS318853")),
SysOperationHelpTextAttribute(literalstr("@SYS318854")),
SysOperationDisplayOrderAttribute('1')
]
public TransDate parmFromDate(TransDate _fromDate = fromDate)
{
    fromDate = _fromDate;
    return fromDate;
}


SysOperationValidatable

The main goal of the SysOperationValidatable interface is to implement the contract validation. It allows you to validate the values provided for the data contract. For example, when users enter the field value on the dialog and press the “OK” button the "validate" method of the data contract will be called.

From a code perspective, its implementation looks like:

class CustRecurrenceInvoiceDataContract implements SysOperationValidatable

In addition, you heed to override the "validate" method:

/// <summary>
/// Determines whether the parameters are valid.
/// </summary>
/// <returns>
/// True when the parameters are valid; otherwise, false.
/// </returns>
public boolean validate()
{
    boolean ok = true;

    // add your validation here

    return ok;
}


SysPackable

The SysPackable interface implementation forces the data contract class to create the "pack" and "unpack" methods which means that we can do serialization on it, like pack and unpack the variables defined in the #CurrentList for the #CurrentVersion macro. 

class EAMWorkOrderAddNoteDescriptionContract implements SysPackable
{
    Int   dummy;

    #define.CurrentVersion(1)
    #localmacro.CurrentList
        dummy
    #endmacro
}

public container pack()
{
    return [#CurrentVersion, #CurrentList];
}

public boolean unpack(container _packedClass)
{
    Version version = RunBase::getVersion(_packedClass);
    boolean ret = true;

    switch (version)
    {
        case #CurrentVersion:
            [version, #CurrentList] = _packedClass;
            break;

        default:
            ret = false;
    }

    return ret;
}

Visual Studio 2022 requirements to upgrade Tier-1 environments (CHE) to version 10.0.44.

If you are going to upgrade your developer cloud-hosted (OneBox) environments to version 10.0.44, you may face an issue at step 27. The issue is related to Visual Studio 2022.

Executing step: 27
Update script for service model: DevToolsService on machine: localhost update DevTools service Catastrophic failure in extension loading: The method or operation is not implemented. with stack:
...........................
The step failed

OR
Executing step: 27
Update script for service model: DevToolsService on machine: localhost update DevTools service
Cannot convert value "17.14.6 (June 2025)" to type "System.Version". Error: "Input string was not in a correct format."
The step failed

A new version of Visual Studio 2022 has been released to address this issue. If you are currently using version 17.14.2 or earlier, please update to version 17.7 or later. Once you have updated, try/retry the update process again.

D365 SCM. Deprecation of inventory transactions to track on-hand inventory in internal warehouse operations.

As you probably know, approximately in one year after the release of version 10.0.41, support for inventory transactions support for internal warehouse operations will be removed and all customers will be required to move to warehouse-specific inventory transactions for tracking on-hand inventory for internal warehouse operations.

It seems that the inventory transaction scenarios will be deprecated in version 10.0.45 or 10.0.46. There is a chance that, in one of the next versions (10.0.47 or higher), the application code related to inventory transactions for internal warehouse operations can be removed. 
If you still use inventory transactions for internal warehouse operations you have time for switching to the warehouse-specific inventory transactions feature. Don’t waste time. :)

Update: Microsoft will deprecate in version 10.0.49 the flighting and code that allows you to enable or disable warehouse inventory transactions in WHS parameters

Changes to "Found" cache type in version 10.0.44

It seems that Microsoft will release a fix for a cache performance in version 10.0.44. (https://fix.lcs.dynamics.com/Issue/Details/?bugId=976894&dbType=3)

Based on the description of the fix, currently, any insert operation is flushing everything from the found cache, across all AOSes. When a record is inserted into another AOS, then the cache is flushed. In fact, it means that each AOS has to recache the data.

As far as I know, today any update/insert/delete triggers an update in SysCacheFlush, forcing other AOSes to flush whatever data they have cached. 

I guess, the fix is to stop flushing for inserts on Found cached tables. Therefore, an insert into a table where found data is cached will not require any cache invalidation (flushing).

I think, the fix can resolve the issue, when the data should be cached, but the kernel is performing queries towards the database, while the expectation is that the data should be fetched from cache. 
In addition, the fix can bring performance value, since there are some tables in the system that use the "found" cache type, which are used most often, for example - SalesTable, SalesLine, PurchTable, PurchLine.

Tier-1(CHE) and Unified Developer Experience (UDE) environments build error: Another build is in progress.

In some cases you may face an issue with a model or project build in a Tier-1 environment.The error can be "another x++ build is currently running" or "another build is in progress". 

I guess, advice on how to solve this problem can be easily found on the Internet. For example, you can restart your virtual machine or kill the build process (xppcAgent) manually and try again. 

I believe it would be great to know the reason for this issue. In Visual Studio 2022, there is a setting called "Build Modules in Parallel". If it is enabled, you might constantly face the issue mentioned above.

So, it makes sense to check and deactivate this parameter in order to increase build stability in Tier-1 or Unified Developer Experience (UDE) environments.



Ax 2012 data upgrade in Tier-1 development environments(CHE). Error: System.IO.FileNotFoundException: Could not load file or assembly 'System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.

During the data upgrade from AX2012 to D365FO I got the following error in step 3 on /DataUpgrade/PreReqs/AdditiveDbSync: System.IO.FileNotF...