How to fix Unsupported version Error in Visual Studio

Finn Dawid 0 Reputation points
2023-07-12T22:13:40.88+00:00

I'm currently trying to build a driver on Visual Studio Community 2022, Windows SDK Version 10.0.22621.0

Whenever I try to build I get the following error - 'Windows7' is not a supported OS Version

I find this strange because I'm on Windows 11.

I'm not too knowledgeable about this kind of thing but I couldn't find anything online.

Description: File:

'Windows7' is not a supported OS Version C:\Program Files (x86)\Windows Kits\10\build\10.0.22621.0\WindowsDriver.common.targets

I tried changing all instances of Windows7 in the file to Windows11 and then replacing it but that didn't work.

Developer technologies Visual Studio Debugging
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 34,436 Reputation points Microsoft External Staff
    2023-07-13T03:04:54.65+00:00

    Hello @Finn Dawid ,

    Welcome to Microsoft Q&A forum.

    If this error appears in this specific project(not in a newly created project), then you may follow the error message => "Windows7 is not a supported OS Version" to check where you targeted Windows 7.

    You may check the project file(right-click your project => Unload Project => right-click it again => Edit Project File). See if there’s any property like <TargetVersion>Windows7</TargetVersion> and try to modify them manually. I also suggest you double check the methods/APIs… and avoid targeting Windows 7.

    Sincerely,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.