Skip to content

Fix NuGet driver support when props import early#42

Merged
ntoskrnl7 merged 7 commits into
mainfrom
fix/nuget-driver-import-order
Jun 17, 2026
Merged

Fix NuGet driver support when props import early#42
ntoskrnl7 merged 7 commits into
mainfrom
fix/nuget-driver-import-order

Conversation

@ntoskrnl7

@ntoskrnl7 ntoskrnl7 commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • move driver/app mode defaults from crtsys.props into crtsys.targets so driver support is evaluated after WDK project configuration is available
  • have the package provide driver exception handling and Inf2Cat local-time defaults
  • update both NuGet consumer tests to import crtsys.props early, matching the problematic packages.config/native NuGet import shape
  • update Test-CrtSysNuGetPackage.ps1 to install crtsys into the default versioned packages/crtsys.<version> folder and pass that installed package root into MSBuild
  • update the driver consumer test to rely on the package for /EHsc

Validation

  • XML parsed for crtsys.props, crtsys.targets, crtsys_nuget_test.vcxproj, and crtsys_nuget_app_test.vcxproj
  • PowerShell parsed for Test-CrtSysNuGetPackage.ps1
  • git diff --check
  • manual MSBuild driver repro using a copied WDK driver project with early crtsys.props import and no consumer-side /EHsc or Inf2CatUseLocalTime workaround:
    MSBuild.exe MyDriver1.vcxproj /t:Rebuild /m:1 /p:Configuration=Debug /p:Platform=x64 /p:SignMode=Off /v:minimal
  • NuGet app consumer builds with early crtsys.props import and a versioned CrtSysPackageRoot path:
    • Debug|x64
    • Release|x64
    • Debug|Win32
    • Debug|ARM64

Notes: the manual driver repro produced MyDriver1.sys and a catalog with Inf2Cat signability errors/warnings reported as None. The app builds stayed in header-only app mode with CrtSysUseDriverSupport=false.

@ntoskrnl7 ntoskrnl7 merged commit 960efb6 into main Jun 17, 2026
34 checks passed
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

Successfully merging this pull request may close these issues.

1 participant