Hi @Amartya, Shreyank , here is my new response for your recent update:
I created a new empty WDM project, but it also doesn't have "Driver Settings" under Project Properties.
If Driver Settings is missing even for a newly created WDM project, then Visual Studio is not loading the WDK project system at all on this machine.
Since this project wasn’t created using Visual Studio’s WDK templates, the WDK build logic isn’t automatically set up. So, I believe the only option left is to manually configure MSBuild:
For each driver (.sys) project, please edit the .vcxproj and add:
- Import WDK props/targets
<Import Project="$(WDKTargetsPath)\Microsoft.DriverKit.props" />
…
<Import Project="$(WDKTargetsPath)\Microsoft.DriverKit.targets" />
- Force the kernel toolset
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
These two steps are both required; doing only one is not sufficient.
For static libraries used by the driver:
Keep ConfigurationType = StaticLibrary
Add:
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
Do not import DriverKit props/targets into static libs.
After editing the .vcxproj files, close and reload the solution, then rebuild all configurations so MSBuild picks up the new imports and toolset.
You can also create a new Kernel Mode Driver (WDM) sample project (have to a real WDM working project, use other working machine to create) and compare its .vcxproj with your existing projects to ensure your manual edits (imports, <PlatformToolset>, property groups) match a correctly configured driver project.