Hello Friends!
I pushed to move huge project set to the latest VS2022.
I spent 2.5 days, got over a lot of problems and till now I have one with configuration VS2022 + WDK. 
Application layer Projects compilation is OK.
But kernel Projects (Libs + Drivers), which use Platform Toolset WindowsKernelModeDriver10.0, gives error:
1>C:\Program Files (x86)\Windows Kits\10\build\10.0.22621.0\WindowsDriver.common.targets(314,5): error MSB4044: The âValidateNTTargetVersionâ task was not given a value for the required parameter âValidNTTargetVersionsâ.
I found Microsoftâs recommendation https://github.com/microsoft/DMF/issues/224 to use
! set MSBuildUserExtensionsPath=%VSINSTALLDIR%\MsBuild
Itâs only add additional warning to the error list about double imports. 
I setup the latest version of MS2022, SDK and DDK:
! Microsoft Visual Studio Professional 2022
! Version 17.7.5
! VisualStudio.17.Release/17.7.5+34202.233
! Microsoft .NET Framework
! Version 4.8.04084
!
! Installed Version: Professional
!
! Visual C++ 2022 00476-80000-00000-AA406
! Microsoft Visual C++ 2022
!
! âŚ
!
! Windows Driver Kit 10.0.22621.311
! Headers, libraries, and tools needed to develop, debug, and test Windows drivers (msdn.microsoft.com/en-us/windows/hardware/gg487428.aspx)
Where is the problem?
How it may be fixed?
Thanks & Best Regards,
Michael Grabelkovsky.
No recommendations here? 
If so, somebody may recommend the address in Microsoft Driver Support, where really may help?
What is WindowsTargetPlatformVersion set to in your vcxproj files?
Mark,
Thanks a lot!
Your idea was not right. But you hint me the direction where to looking for the problem! And I found it. 
Peter,
if you read it. Itâs bug Microsoft and it must be fixed!
How to report Microsoft about?
The details follows.
Problem Solution
Add into vcxproj file two lines:
(1st is obligated, 2nd is recommended)
Problem Source
My Project went from VS2012 â VS2017 â VS2022.
What is interesting, if open VS2017 and go Project â Properties â Driver Settings.
Target OS Version is written Windows 10 or higher.
But!!! Appropriate vcxproj file has not or this option is empty!?!
Itâs seen as this value is default for VS2017, but not default for VS2022.
Unfortunately the error message does not hint the source of problem. :neutral:
How to Found
Itâs impossible to find error in key which really absent in vcxproj, means absent. 
I built new, alternative project inside VS2022 (which works!) and compare it with my native.
Other problems
My 1st fix project was static lib for driver (build with WindowsKernelModeDriver10.0).
Currently I see problems in others, driver projects.
VS202 inside GUI Project â Properties does not show drivers sections: Driver Settings, Driver Install, Inf2Vat etc. :neutral:
But currently I know how to find the problems. 
FWIW, I recommend you REBUILD your projects and solutions when you change your tool chain to a new version of VS. Going the âupgradeâ route rarely works well, at least for me.
Itâs always been thusâŚ
Peter
Peter,
Thanks!
Itâs exactly what I asked. And reason for going to VS2022 is important - future support ARMâŚ
The problem, I have set from ~170 Projects, including applications, drivers, libs, plugins, C++, C# etc.
I have no other way: try to use âupgradeâ route and fix the problems otherâŚ
By the way, the next problem:
Driver Projects does not seen as Driver in GUI. Means there are absent sections such as Driver Settings, Driver Install, Inf2Cat etc.
I did not start to solve it yet, but itâs seen Microsoft Project Convertor canât support Platform Toolset: WindowsKernelModeDriver10.0. 
I may report when will find. 
Some additional information for fellowsâŚ
After few attempt I resume, that Microsoft completely not checked Project Convertor on VS2022 for case kernel components (drivers, static libs) which are built with Platform Toolset WindowsKernelModeDriver10.0.
I must agree with Piter, on VS2022 itâs easier to create new project from template and fill it up by hand then spend a time to understand problems after Project Converter.
As bonus you would immediately receive support for ARM⌠
PS. I have not (yet) same problems with toolset Visual Studio 2022 (v143) , only with WindowsKernelModeDriverâŚ
In general user mode C# and C++ projects are well tested in VS and conversion works. On the other hand, there has been a long standing disconnect between the VS release process and the WDK. My guess is that there are two different teams involved, and the VS team does not have responsibility for the WDK release and as a consequence VS gets released despite breaking WDK components.
Mark,
I guess you right.
The problem that Microsoft is great firm and it must integrate components better. 
I give now some hints for fellows who will need to move old driver to VS2022.
-
Microsoft gives few templates for drivers. KMDF driver template is good. WDM Driver template is empty and has not all needed components for real driver!
But my driver is written a time ago, I need WDM.
What I had done, I took KMDF template, deleted all code, such as remined only Driver.c module with 2 functions DriverEntry() and UnloadDriver().
Inside vcxproj I replaced in DriverType all KMDF on WDM.
So I received good compiled template for WDM driver.
-
I replaced all source files on my sources and carefully arranged vcxproj. Carefully means step by step with checking that driver build process is OK after every change.
-
Pay attention on INF file, It must be correct! Microsoft adds few checking which works with INF file inside building process. FĐžr example, I even donât know which components press inside log the lines:
Stamping C:\MG\epw-f1e_22\temp\Release.x64\WEP\Common\nep\src\driver\obj\cwnep.inf
Stamping [Version] section with DriverVer=10/30/2023,15.11.22.2_83
but when I took my old INF (not generated by template), it even does not start code compilation!?!
Other utility which use INF is binplace.exe.
The problem its errors does not described! I run into one problem, which did not solved and finally took INF from template.
I guess I will need arrange it too, but itâs my future task, not nowâŚ
4, I returned Warning Level from VS2022 Level4(/W4) back on Level 3 which used for WDK drivers compilation previously. The reason, I received s much error on level 4 - I have not time to fix all this⌠
I just donât bother with the templates. I grab samples from the msft git hub repo and use those as âtemplatesâ. As an amusement I created some powershell scripts that automate grabbing a sample project and copying it to its own git repo and fixing up some of the junk that msft puts in their samples that break building them (e.g. the Sample class and guid in inf files.)
There are issues you still have to deal with, like the endless turmoil in Infverify. The samples are behind the latest wdk at this point. But that is just a minor annoyance.
The stampinf and infverify tasks are run if your project has an inf file listed in the vcxproj file.
My guess is that there are two different teams involved, and the VS team does not have responsibility for the WDK release
I can confirm that this is exactly how it works.
WDK team does the WDK; The Visual Studio team does⌠Visual Studio.
some hints for fellows who will need to move old driver to VS2022.
Hmmmm⌠In VS, just create a new project with an empty driver of the type that you want to build. From Solution Explorer, add the source and header files comprising your driver. At that point, you are pretty much done, right?? (Pro tip: In Solution Explorer, you can âaddâ multiple source files at once⌠sort your project directory by file type, and in a single step you can add all your CPP files⌠release for .H files⌠then itâs time to make yourself some a Mai Tai or two, no conversion required ;-)).
Peter

Piter,
itâs not so direct.
After I took WDK Template (empty) and even added into file Device.c with single (empty too) function DriverEntry(), itâs did not start to compil even!
Output:
Build startedâŚ
1>------ Build started: Project: MyDriver1, Configuration: Debug x64 ------
1>Building âMyDriver1â with toolset âWindowsKernelModeDriver10.0â and the âDesktopâ target platform.
1>Stamping x64\Debug\MyDriver1.inf
1>Stamping [Version] section with DriverVer=10/31/2023,10.24.5.380
1>C:\Tmp\MyDriver1\MyDriver1\MyDriver1.inf : error 1297: Device driver does not install on any devices, use primitive driver if this is intended.
1>Done building project âMyDriver1.vcxprojâ â FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build started at 10:24 and took 00.518 seconds ==========
There is exist option try to fix generated INF. But I even donât know which utility generates lines âStamping âŚâ. Itâs something new which absent in previous versions which I worked.
I prefered to start from âworkingâ KMDF template and modify it.
Obviously try to fix INF also is alternative way. 
Question:
Who knows which utility generate âStampingâŚâ lines?
Idâ like to understand which checking it doesâŚ
Inf stamping has been a feature of the wdk build for a very long time. The utility is âstampinfâ, and the msbuild task is documented here: https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/stampinf-task
Yes, but he asked specifically what was generating the âstampingâŚâ line.
Doron,
nice to meet you again! 
And Thank you for really interesting reference!
Unfortunately Google does not find error such as 1297, error text did not helped me too. 
(Compiler errors C9999 - no problem).