Trying to deploy a KMDF USB driver, I faced an assembly-not-found issue on step 6, my test machine cannot be configured properly.
Having:
- host machine:
** Windows 10 21H2, 64-bit, x86-64 (AMD64),
** Windows SDK version 10.0.26100.1,
** WDK version 10.0.26100.1,
** Visual Studio 2022 17.10.1; - target machine:
** Windows 10 1607, 64-bit, x86-64 (AMD64), at VMware Workstation,
** WDK version 10.0.26100.1 (same as the host).
When trying to deploy (doing everything strictly by the manual referenced above, although it has expired in some points), it writes an error on task “Default Driver Package Installation Task”:
$KitRoot$TestingRuntimesTAEF%PROCESSOR_ARCHITECTURE%MinTEte.exe "%SystemDrive%DriverTestRunDefaultDriverPackageInstallationTask.dll" /select:"@Name='Microsoft.DriverKit.DefaultDriverPackageInstallationClass.PerformDefaultDriverPackageInstallation'" /p:"AbsoluteDriverPackagePath=%SystemDrive%DriverTestDriversMyFirstKmdfDriver.inf" /p:"TestHarness=ERT" /p:"DQ=%SystemDrive%DriverTestDriversMyFirstKmdfDriver.inf" /p:"TestHarness=ERT" /rebootStateFile:%SystemDrive%DriverTestRunDriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%DriverTestRunDefault_Driver_Package_Installation_Task_00013.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated
...
ERROR: Task "Default Driver Package Installation Task" failed to complete successfully. Look at the logs in the driver test group explorer for more details on the failure.
Since the following task, “Driver Post Install Actions”, is performed anyway, I had to catch a moment on my test machine when the corresponding console is shown (for a second or two) and the file “Default_Driver_Package_Installation_Task_00008.wtl” is generated (gets removed in several seconds by the other task).
These console and file print:
System.IO.FileNotFoundException: Could not load file or assembly 'WDTFDriverSetupSystemAction.Interop, Version=10.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
File name: 'WDTFDriverSetupSystemAction.Interop, Version=10.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at Microsoft.DriverKit.DefaultDriverPackageInstallationClass.PerformDefaultDriverPackageInstallation()
...
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLMSoftwareMicrosoftFusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLMSoftwareMicrosoftFusion!EnableLog].
Visual Studio shows me a message box with the following text:
“The driver must be deployed to the target computer for debugging to work. Deployment failed.”
Command where /R "C:Program Files (x86)Windows Kits" WDTFDriverSetupSystemAction.Interop.dll
prints:
- “C:Program Files (x86)Windows Kits10TestingDevelopmentlibarm64WDTFDriverSetupSystemAction.Interop.dll”
- “C:Program Files (x86)Windows Kits10TestingDevelopmentlibx64WDTFDriverSetupSystemAction.Interop.dll”
- “C:Program Files (x86)Windows Kits10TestingDevelopmentlibx86WDTFDriverSetupSystemAction.Interop.dll”
But adding an x86-64 version’s path to system %Path% does not help. Not sure if modifying GAC might help. What else can I try to do to deal with this error or work it around somehow?
Thanks in advance!