项目属性的target platform和target platform version到底是什么(vs2015开发windows驱动小记)

根据官方对属性页的介绍(General Property Page (Project))可了解:

target platform是build后的结果会跑在哪个平台,例如windows,android,OS。。诡异的是对windows的描述:如果这里显示win10,则指的是universal windows platform; 如果你target earlier version windows, 就会显示个windows..估计在这大家都会以往这是给你做了规范让你2选1,但官网后边马上跟一句:这个target platform吧,你创建项目时就已经订好了,不可改 -写到这自己也算明白了,估计这针对的是新建project那种、当然不是新建project那种也可涵盖:基本都会有个metadata在项目设置里边了。。所以读到这里,估计您也清楚了、此处不诡异。8-)

target platform version, 这个顾名思义就是想跑在具体哪个版本的windows上。。实际官网还真不是这么说的,“For the Windows platform, specifies the version of the Windows SDK that your project builds with”(当然驱动开发估计用wdk来代替sdk说明,更合适点?)。。后边那段就好理解了,怎样支持win7、乃至xp的开发。。

联系web虎所用2个64位驱动:到底在build时要生成几个版本? - web虎 - 博客园 ,自己理解并尝试的:toolset你可选择最新的,因为它可涵盖前边多个版本windows驱动的开发,但再次提醒注意,它支持支持开发,并没说支持你 build1次就生成可支持多个版本windows的驱动了!

综上,vs2015支持开发目标为win7sp1以后的windows驱动,如下表

windows驱动版本 所需要的wdk Target Platform Version toolset 备注
win10(win2016) wdk10+ 10.* WindowsKernelModeDriver10.0  
win8.1~win7sp1(win2012~win2008) wdk8+ 8.1 WindowsKernelModeDriver8.1  
         

备注:

 Building a Driver with the WDK | Microsoft Docs 说 vs2015也支持build win7的driver。

这篇更猛,说还能支持xp开发: Configuring Programs for Windows XP | Microsoft Docs

猜你喜欢

转载自www.cnblogs.com/webtiger/p/8858756.html
今日推荐