Unable to edit MDT XML unattended file: Could not load file

Microsoft Deployment Toolkit (MDT) is a unified collection of tools, processes, and guidance for automating desktop and server deployment. And this in turn reduces deployment time and standardizes desktop and server image deployment. In this guide, we shall discuss the fix to “Unable to edit MDT XML unattended file: Could not load file”. Please, see “ADK|WinPE|MDT: Deploy Windows with WDS“, and What are the differences between dnf and apt package managers?
The Windows Assessment and Deployment Kit (Windows ADK) and Windows PE add-on has the tools you need to customize Windows images for large-scale deployment, and to test the quality and performance of your system, its added components, and the applications running on it
The Windows ADK now supports on-demand servicing package updates, allowing its tools and components to be updated individually without reinstalling the entire kit by downloading the latest updates from the Windows ADK Servicing Updates page. Please, see How to uninstall and upgrade ADK, WinPE, and MDT on how it was done previously.
Also, see “how to install Endpoint Configuration Manager on HyperV VM, How to modify Windows 11 Taskbar via Intune and GPO, and “Install Windows Admin Center in an unattended mode using a self-signed certificate“.
Reason for the error “Could not load file”
The below error occurs when Microsoft Deployment Toolkit (MDT). It tries to generate a catalog (.clg) file for a Windows image (install.wim). But cannot find the required components.
The core problem is a version and compatibility mismatch. Here, Microsoft Deployment Toolkit (MDT) is calling Microsoft.BDD.Catalog40.exe, and it expects the legacy WSIM assemblies (including Microsoft.ComponentStudio.ComponentPlatformInterface, Version=6.2.0.0).
While the newer Windows 11 ADK installed no longer ships those exact binaries in the locations and versions MDT expects. Because of this, MDT cannot generate the catalog for the Windows 11 24H2/25H2 install.wim. This is the rason for the error “Could not load file or assembly” when trying to edit unattend.xml in the MDT UI. See the below image for more information.
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ComponentStudio.ComponentPlatformInterface, Version=6.2.0.0, Culture=neutral, PublicKeyToken=xxxxxx'

More of the error message below!
Performing the operation "generate" on target "Catalog". Starting: "C:\Program Files\Microsoft Deployment Toolkit\Bin\Microsoft.BDD.Catalog40.exe" "Z:\Deployment\Operating Systems\W11-25H2\Sources\install.wim" 3 > "C:\Users\xxx\AppData\Local\Temp\Microsoft.BDD.Catalog.log" 2>&1 Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ComponentStudio.ComponentPlatformInterface, Version=6.2.0.0, Culture=neutral, PublicKeyToken=xxxxxx' or one of its dependencies. The system cannot find the file specified. at Microsoft.BDD.Catalog.Program.DoCatalog() at Microsoft.BDD.Catalog.Program.Main(String[] args) Non-zero return code from catalog utility, rc = -532462766
Therefore, the below wizard is prompted. Click on Ok to close.

Windows System Image Manager (WSIM)
The assembly Microsoft.ComponentStudio.ComponentPlatformInterface.dll is part of the ADK. Specifically, the WSIM component.
As you can see, during the installation of ADK, we have the applicable features selected. That is, WSIM (Windows System Image Manager) is part of the “Deployment Tools” feature, yet we are having the error.

The WSIM is a tool that allows users to create and manage answer files for Windows installations. These answer files are XML files that contain the settings and configurations for the installation process. It is used to automate the installation of Windows by preconfiguring settings such as language, disk partitions, and user accounts.
The Windows SIM GUI is divided into five sections, which Microsoft calls “panes.” IT teams can use these multi-purpose panes to create unattended answer files, and then add components and packages to the respective configuration passes in an answer file.

Note: When you create or regenerate a catalog file in MDT. It internally launches
Microsoft.BDD.Catalog40.exe. This depends on WSIM libraries from the ADK. If “the ADK is not installed, or “the Windows System Image Manager (WSIM) feature is missing”.
This means, we have ADK and WinPE installed on this server. We have 10.1.26100.6584 running, and simply the reason for my issues.

Please, see Windows PE working for Windows 11 and Windows Server 2022, and how to Prevent Microsoft Teams from starting automatically on Windows.
My Take Away for Generating Catalog Files
Note: Microsoft does not officially support MDT for Windows 11 and only supports it up to Windows 10 1809. You can take a look at the “Microsoft Deployment Toolkit known issues“. Also, se this extensive discussion on Borncity on End of support for MDT.
But, Windows ADK supports the following OS releases as discussed below and in this link.

As the WSIM is present in your ADK installation. MDT cannot use WSIM from the newer ADK because MDT is outdated and expects older DLLs that were removed or replaced in Windows 11 ADK. This is why the catalog generation fails, despite ADK is installed as mentioned above already.
Newer Windows Assessment and Deployment Kit (ADK) versions for Windows 11 24H2 and 25H2 ship the Windows System Image Manager (WSIM) with different DLL versions and omit some legacy assemblies, such as Microsoft.ComponentStudio.ComponentPlatformInterface, v6.2.0.0. As a result, MDT cannot reliably deploy these newer Windows 11 builds, limiting its effectiveness for modern deployment scenarios.
Please, see how to integrate Active Directory with IPMI for Out-of-Band Management, how to migrate Microsoft Enterprise Root Certification Authority and Forest Domain to Azure, and Unveiling OOTBI Mini and New Features for v1.7 from Object First.
Workaround to fixing Could not load file or Assembly
Use Windows ADK 10.1.26100.2454 (December 2024) or an older ADK version with MDT if you want fully automated catalog generation.

Please, see How to create a backup job for Proxmox VMs using VBR, Migrate Windows Servers from Hyper V to Proxmox Correctly, and Hyper V Disk allocation: Why Veeam reports full size after Shrinking.
Workaround 1: – MDT Deployment Tool Modification
Reframe from modifying the “
DeploymentTools.xml” edits as workarounds that may break with future ADK releases and are not guaranteed by Microsoft. You may proceed as you wish. Use Microsoft Configuration Manager. Please, see how to install Endpoint Configuration Manager on HyperV VM or autopilot.
Alternatively, when using the latest Windows ADK with MDT, generating catalogs (.clg files) for Windows 11 fails. This happens because newer ADK versions ship architecture-specific WSIM (Windows System Image Manager), whereas earlier ADKs included only an x86 version. MDT’s default configuration doesn’t account for these architecture-specific paths, so it can’t locate imgmgr.exe correctly.
The MDT references imgmgr.exe via the DeploymentTools.xml configuration file. But it expects a single (x86) WSIM. The newer ADK includes separate folders for x86 and x64, so MDT doesn’t automatically know which executable to call for the image’s architecture.
C:\Program Files\Microsoft Deployment Toolkit\Bin\DeploymentTools.xml
Edit the MDT configuration file DeploymentTools.xml

Please, instruct MDT to dynamically use the correct architecture-specific WSIM (x86 or x64) for the image being processed.

Find the right platform path as shown below
<tool name="imgmgr.exe">%ADKPath%Deployment ToolsWSIM%RealPlatform%</tool>
As you can see above, and in the xml text below, provide the %RealPlatform% value for the imgmgr.exe tool.

If you are working with both x86 and x64 images, MDT requires the dynamic %RealPlatform% variable in DeploymentTools.xml so it can automatically select the correct WSIM executable for each architecture. As you can see below, the above workaround fixed this issue.

You can now start managing your answer files for Windows installations

MDT was originally designed to call the x86 WSIM executable regardless of the image architecture. Microsoft recommends using the 32-bit version of Windows SIM to create catalog files
- Newer ADK versions ship architecture-specific WSIM (x86 and amd64).
- If MDT points to
amd64\imgmgr.exe, it may fail because MDT’s internal scripts and variables still reference the x86 version. Use the workaround discussed above.
Workaround 2: Copying Previous WinPE x86 Directory to Bypass Missing WinPE Installation
Reframe from copying the “x86 WinPE” as workarounds that may break with future ADK releases and are not guaranteed by Microsoft. You may proceed as you wish.
Since the full installation of the December Windows ADK does not include the complete x86 WinPE files, you can manually copy the x86 WinPE directory from a previous ADK version into the corresponding WinPE folder in the new ADK installation

As you can see, I went to a test system and I will be copying these files to the above location as shown below.
C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86

As you can see, the copying is in progress.

Files copied to the desired location
C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86

That is all and should work. Else, let me know in the comment section the method that worked for you. You cannot combine multiple workaround, else both will not work. You will have the below error error. You can try to reinstall the ADk if this is your case.
PerZorming the operation "generate" on target "Catalog".
Starting: "C:\Program Ziles\MicrosoZt Deployment Toolkit\Bin\MicrosoZt.BDD.Catalog40.exe" "z:\Dep\Operating Systems\W11\Sources\install.wim" x > "C:\Users\techda~1\AppData\Local\Temp\MicrosoZt.BDD.Catalog.log" 2>&1
No existing catalog Zile Zound.
PROGRESS: 0: Starting.
PROGRESS: 0: Creating mount Zolder: C:\Users\techda~1\AppData\Local\Temp\IMGMGR_install_Windows 11 Enterprise_5kwkdq.pox.
PROGRESS: 5: Creating temp Zolder: C:\Users\techda~1\AppData\Local\Temp\IMGMGR_install_temp_c2agvybc.j4t.
PROGRESS: 10: Mounting Windows image: Z:\Deployment\Operating Systems\W11\Sources\install.wim. This might take a Zew minutes.
ERROR: Unable to generate catalog on Z:\Deployment\Operating Systems\W11\Sources\install.wim: System.ComponentModel.Win32Exception (0x80004005): The process cannot access the Zile because it is being used by another process
at MicrosoZt.ComponentStudio.ComponentPlatZormInterZace.WimImageInZo.PreCreateCatalog()
at MicrosoZt.ComponentStudio.ComponentPlatZormInterZace.OZZlineImageInZo.CreateCatalog()
at MicrosoZt.BDD.Catalog.Program.DoCatalog()
Non-zero return code Zrom catalog utility, rc = 2002
Alternatively, manually generate the catalog using WSIM. open WSIM from C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\WSIM\ depending on your path and load the “install.wim“. Then generate the .clg file manually and place the .clg in the MDT OS folder. You may want to see this blogpost for more information.
I hope you found this article on how to fix “Unable to edit MDT XML unattended file: Could not load file” very useful. Please, feel free to leave a comment below.