I’ve inherited a driver project and unfortunately don’t have a lot of background in driver development. Forgive me if my terminology is off but this problem is a little weird and I’ve run out of ideas.
It’s a KMDF USB driver in a Visual Studio 2012 solution with a driver project and a package project. We’ve been porting all of our other code to a new build system but this one has been pretty much left alone and just dropped into the new build as-is.
When I first started working with it I was having a problem that the driver would build but the packaging would fail. Using ProcMon to trace a working build I determined that at some point in the build, MSBuild would copy the wdfcoinstaller dll of the appropriate version into the build output directory and then the packaging script calling stampinf, makecat, etc. would do it’s magic. When the wdfcoinstaller dll isn’t there, makecat complains and the build fails.
The script looks like this:
pushd $(PackageDir)
$(STAMPINF_TOOL) -f ebUniversalProForU3V.inf -d * -v $(EBUS_VERSION_MAJOR).$(EBUS_VERSION_MINOR).$(EBUS_VERSION_SUB).$(EBUS_VERSION_BUILD)
copy $(SolutionDir)\ebUniversalProForU3V.cdf .
$(MAKECAT_TOOL) -v ebUniversalProForU3V.cdf
del ebUniversalProForU3V.cdf
$(SIGN_TOOL) sign /ac “$(CO_CERTIFICATE_RELEASE)” /s my /n Pleora /t http://timestamp.verisign.com/scripts/timestamp.dll ebUniversalProForU3V.sys
$(SIGN_TOOL) sign /ac “$(CO_CERTIFICATE_RELEASE)” /s my /n Pleora /t http://timestamp.verisign.com/scripts/timestamp.dll ebUniversalProForU3V.cat
popd
and produces this output:
2>C:\Program Files (x86)\Windows Kits\8.0\build\WindowsDriver8.0.common.targets(1338,5): error : Verification Error: Driver package has no driver version.
2>C:\Program Files (x86)\Windows Kits\8.0\build\WindowsDriver8.0.common.targets(1338,5): error : INF file S:\sw\Drivers\ebUniversalProForU3V\ebUniversalProForU3V\x64\Win7Debug\ebUniversalProForU3V.inf fails validation.
2> Done Adding Additional Store
2> Successfully signed: S:\sw\Drivers\ebUniversalProForU3V\x64\Win7Debug\ebUniversalProForU3V.cat
2>
2> Stamping .\ebUniversalProForU3V.inf [Version] section with DriverVer=01/08/2016,5.2.2.3717
2> 1 file(s) copied.
2> opened: ebUniversalProForU3V.cdf
2> attribute: OSAttr
2> processing: File1
2> processing: File2
2> NOT processed: member file does not exist (.\WdfCoinstaller01011.dll)
2>Failed : CryptCATCDFEnumMembersByCDFTagEx. Last error : 0x00000002
2>
2> Errors found in parsing the CDF file
2> Done Adding Additional Store
2> Successfully signed and timestamped: ebUniversalProForU3V.sys
2>
2> Done Adding Additional Store
2> Successfully signed and timestamped: ebUniversalProForU3V.cat
I don’t know what I did but at some point it started working for me. The driver built properly and everything was good. So here’s what’s weird. At some point in the last couple weeks, it started failing for me again. The project builds fine on our build machine and some other developers machines. My machine and another one of our devs get the failure. I traced it with ProcMon and I see MSBuild (and devenv) actually opening up wdfcoinstaller01011.dll in the ddk directory but it never does the copy.
There’s a bunch of things I don’t understand about how this project is laid out. The driver project seems to do a bunch of things like calling stampinf and such already and the packaging project seems like it’s repeating things. I’m not sure why it’s manually calling things like stampinf and makecat in a script when it seems like the project itself has the ability to do all these things.
Anyway, I’m at the end of my rope so I hope someone can at least give me an idea of something to try. I had installed the driver on my dev machine at one point which installed the coinstaller in the underlying OS so I thought that might be it but uninstalling it didn’t seem to help. Any other ideas?
cheers,
Chris