forderud / IntelliMouseDriver

Filter drivers for Microsoft Pro IntelliMouse that implements safety checks and exposes a WMI interface
MIT License
1 stars 1 forks source link

Driver INF, CAT & CER files always rebuilt #12

Open forderud opened 1 year ago

forderud commented 1 year ago

Issue: https://github.com/microsoft/Windows-driver-samples/issues/1006

File "dirty" checking seem to be broken for all driver projects. Building the project always seem to trigger a partial rebuild, even if the project is unmodified since the last build. This should not be necessary.

Steps to reproduce

ManOnTheMountainTech commented 3 months ago

What observations are there that the driver is always rebuilt? The INF's are generated every time, and needed files are always copied from each projects individual output directories, but all of the other files are the same. image

forderud commented 3 months ago

What observations are there that the driver is always rebuilt? The INF's are generated every time, and needed files are always copied from each projects individual output directories, but all of the other files are the same.

I've now updated the issue with steps to reproduce. The problem is that Visual Studio keeps regenerating INF, CAT & CER files, even when none of the project files have changed.

ManOnTheMountainTech commented 3 months ago

"Minimal build for production" should turn off always resign when "Sign Mode" is production. When on, the element is inserted. Inf2Cat always runs by default, although the tag can turn it on or off. We'd have to extend visual studio and I'm not sure on how VS causes it's components to be rebuilt. All of these map to MSBuild17 .Net calls that are for internal use only.

forderud commented 3 months ago

"Minimal build for production" should turn off always resign when "Sign Mode" is production. When on, the element is inserted.

I just tested <ClCompile><MinimalRebuild>true</MinimalRebuild></ClCompile> and it didn't help.

Inf2Cat always runs by default, although the tag can turn it on or off. We'd have to extend visual studio and I'm not sure on how VS causes it's components to be rebuilt. All of these map to MSBuild17 .Net calls that are for internal use only.

Please either provide a pull-request that fixes the reported problem or a documentation link as evidence for it being impossible.

ManOnTheMountainTech commented 2 months ago

In regards to speeding up development by enabling minimal rebuild from stampinf to driver signing: If one byte changes then the driver's date and signature need to be updated. Therefore, minimal rebuild for the inx to signature steps has limited impact. However, it can be experimented with by removing the highlighted code from WindowsDriver.Common.targets. image

There is no easy way of overriding this code.

A comment was left on the Windows Feedback tool and can be tracked https://aka.ms/AAq1pip.