Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error MSB8036 The Windows SDK version 10.0.22621.0 was not found (Win10) #84

Open
sequencerr opened this issue Dec 10, 2023 · 0 comments

Comments

@sequencerr
Copy link

sequencerr commented Dec 10, 2023

Probably VS22 Issue.

in vs22:

Severity Code Description Project File Line Suppression State Details
Error MSB8036 The Windows SDK version 10.0.22621.0 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". raw D:\Programs\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.WindowsSDK.targets 46

in node-gyp:

PS D:\Projects\node-raw-socket> yarn install
yarn install v1.22.19
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...

success Saved lockfile.
$ node-gyp rebuild

D:\Projects\node-raw-socket>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild ) 
[##] 2/2gyp info it worked if it ends with ok
gyp info using node-gyp@9.3.0
gyp info using node@18.14.0 | win32 | x64    
gyp info find Python using Python version 3.11.5 found at "D:\Programs\Python\Python311\python.exe"
gyp info find VS using VS2022 (17.8.34330.188) found at:
gyp info find VS "D:\Programs\Microsoft Visual Studio\2022\Community"
gyp info find VS run with --verbose for detailed information
gyp info spawn D:\Programs\Python\Python311\python.exe
gyp info spawn args [
gyp info spawn args   'D:\\Programs\\nvm\\v18.14.0\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-I',
gyp info spawn args   'D:\\Projects\\node-raw-socket\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'D:\\Programs\\nvm\\v18.14.0\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',    
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\yurch\\AppData\\Local\\node-gyp\\Cache\\18.14.0\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\yurch\\AppData\\Local\\node-gyp\\Cache\\18.14.0',
gyp info spawn args   '-Dnode_gyp_dir=D:\\Programs\\nvm\\v18.14.0\\node_modules\\npm\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\yurch\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\18.14.0\\\\<(target_arch)\\\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=D:\\Projects\\node-raw-socket',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'D:\\Projects\\node-raw-socket\\build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn D:\Programs\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe
gyp info spawn args [
gyp info spawn args   'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64'
gyp info spawn args ]

D:\Programs\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.WindowsSDK.targets(46,5): error 
MSB8036: The Windows SDK version 10.0.22621.0 was not found. Install the required version of Windows SDK or change the SDK  
version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [D:\Projects\nod
e-raw-socket\build\raw.vcxproj]
gyp ERR! build error 
gyp ERR! stack Error: `D:\Programs\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit 
code: 1
gyp ERR! stack     at ChildProcess.onExit (D:\Programs\nvm\v18.14.0\node_modules\npm\node_modules\node-gyp\lib\build.js:203:23)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\Projects\node-raw-socket
gyp ERR! node -v v18.14.0
gyp ERR! node-gyp -v v9.3.0
gyp ERR! not ok
error Command failed with exit code 1.

image
image
Able to fix by setting <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> in node_modules\raw-socket\build\raw.vcxproj as suggested in msb8036

but then following appears ...

  1. Severity Code Description Project File Line Suppression State Details
    Warning MSB8003 The WindowsSDKDir property is not defined. Some build tools may not be found. raw D:\Programs\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets 513
  2. Severity Code Description Project File Line Suppression State Details
    Error C1083 Cannot open include file: 'stdio.h': No such file or directory raw D:\Projects\project-name\node_modules\raw-socket\src\raw.cc 4

materials I looked into:

@sequencerr sequencerr changed the title Error MSB8036 The Windows SDK version 10.0.22621.0 was not found Error MSB8036 The Windows SDK version 10.0.22621.0 was not found (Win10) Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant