Writing driver for window 8.1 using vs2017

Hi,
I am trying to develop software driver that should run on win 8.1 onward. I am using vs2017 wdk 10.
With target version windows10(toolset WindowsKernelModeDriver10), its working alright. I want it to run also on windows 8.1. If I change the target version to windows 8.1 by editing project file, solution is not compiling.
I am new to this area and bit confused here about wdk version requirement. Any guidance would be really helpful.

Thanks,

What’s not compiling? What errors do you get? I tend to edit the project files by hand, but have you tried changing the setting within the IDE?

I tried to modify project file manually. Windows8.1
I don’t see this can be changed using vs2017 project property.
On compiling the project, I see
------ Rebuild All started: Project: MyDriver1, Configuration: Debug x64 ------
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Redirect.12.props(51,3): error MSB4019: The imported project “C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.cpp.props” was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
Done building project “MyDriver1.vcxproj” – FAILED.

I see same error when I change platform tool set to WindowsKernelModeDriver8.1

Same project is compiling with target version windows10 and tool set WindowsKernelModeDriver10.0

Is there a way to target driver to windows 8.1 using vs2017? if not what i need to do make it work on windows 8.1?

Any guidance would be really helpful.

thanks,

share or paste your vcxproj file here.

In VS2015, you can change the “Target OS Version” in the Driver Settings section of the config properties.
For me the “Platform Toolset” in the General section is set to WindowsKernelModeDriver10.0 and my “Target OS Version” is set to Windows 7
I haven’t been “brave” enough to try updating to a newer version of VS for driver building.

Hello,

I haven’t been “brave” enough to try updating to a newer version of VS for driver building.

Regarding these settings, Visual Studio 2017 changes nothing, so you need not to worry. Actually, I am way happier with 2017 than 2015 which, to my experience, was susceptible to various strange problems.

VS 2017 is nice and stable, and far better than 2015.

VS 2019 is, in a word, terrible. And the WDK that goes with it is a mess. Super unstable and inconsistent. Stay away.

As a hack hack, I use EDITBIN.EXE /subsystem:native,5.01 /version:5.1 driver.sys (5.02 and 5.2 for x64) to make the driver compatible with XP+ while compiling with latest WDK10 as a post-build operation.

At least, for now, if you take care of APIs you use (dynamic loading or correct versioning), there is no incompatibility issues.