Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Driver INF, CAT & CER files always rebuilt #12

Open
forderud opened this issue Jul 11, 2023 · 5 comments
Open

Driver INF, CAT & CER files always rebuilt #12

forderud opened this issue Jul 11, 2023 · 5 comments

Comments

@forderud
Copy link
Owner

forderud commented Jul 11, 2023

Issue: microsoft/Windows-driver-samples#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

  • Build TailLight driver in Debug|x64
  • Wait 2 min
  • Trigger new Debug|x64 build without changing any files
  • Observe that TailLight.inf, TailLight.cat & TailLight.cer are updated with new timestamps.
@forderud forderud changed the title Driver always rebuild Driver always rebuilt Aug 24, 2023
@ManOnTheMountainTech
Copy link
Collaborator

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
Copy link
Owner Author

forderud commented Apr 9, 2024

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
Copy link
Collaborator

"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
Copy link
Owner Author

"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
Copy link
Collaborator

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.

@forderud forderud changed the title Driver always rebuilt Driver INF, CAT & CER files always rebuilt May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants