I've followed the instructions at https://learn.microsoft.com/en-us/windows-hardware/drivers/gettingstarted/provision-a-target-computer-wdk-8-1 to setup my local machine with Visual Studio and a VM on my local network as the target machine for debugging a kernel mode driver I am trying to create.
Setup of WDK and the provisioning works fine, building the driver works fine, but when I F5 to cause a deploy of the driver to the target machine and debug it, I will see a few console windows pop up on the target, usually ending in red, but the host instance says all is fine per the output from the Driver Output page, telling me:
[15:30:07:093]: Removing any existing files from test execution folder.
[15:30:07:112]: Copying required files for "Gathering kernel debugger settings".
[15:30:08:112]: [Gathering kernel debugger settings] Command Line:
$KitRoot$\Testing\Runtimes\TAEF\te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_LogDebuggerSettings'" /rebootStateFile:%SystemDrive%\DriverTest\Run\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Run\Gathering_kernel_debugger_settings_00038.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated
[15:30:11:418]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0
[15:30:11:419]: Task "Gathering kernel debugger settings" completed successfully
Viewing Driver Test Group Explorer though tells a different story, that the Driver Preparation failed. Drilling into the log the cert install works, the exit code comes back as expected, then I see the following:
Process completed successfully Message 12-27-2023 03:30:26.108 PM
The system cannot find the file specified. Message 12-27-2023 03:30:26.114 PM
A failure occurred while removing previous driver installations
File: , Line: -1
Error Type:
Error Code: 0x0
Error Text: Error 0x00000000
Error 12-27-2023 03:30:26.118 PM
DriverTestTasks::_DriverPreparation
Result: Fail
I can manually copy the driver files across, however I'm trying to speed things up with what should work from Visual Studio and the WDK, but for the life of me cannot figure out how/where else to look to troubleshoot this.
I've stood up extra VMs, same result. Had one VM try to deploy to another, same result.
In some reading, I encountered this SO question Windows KMFD HelloWorld Driver Deployment Task Failed and the answer is one I've tried, going into Project Properties -> Driver Install -> Deployment & unchecking the "Remove previous driver versions before deployment". Same result, the Driver preparation step fails with the same message.
What am I missing/not seeing?