mstorsjo / msvc-wine

Scripts for setting up and running MSVC in Wine on Linux
Other
683 stars 83 forks source link

MSBuild cannot find a installed Windows SDK #134

Open mokurin000 opened 2 months ago

mokurin000 commented 2 months ago

Environment: Kali 2024-05-30

I have installed msvc by running scripts from master branch, c45cfe74a44

./vsdownload.py --dest ~/.vs --cache ~/tmp
./install ~/.vs

without any error.

if I run ~/.vs/bin/x64/msbuild, I get nothing But the command

~/.vs/bin/x64/wine-msvc.sh ~/.vs/MSBuild/Current/Bin/amd64/MSBuild.exe

Failed with the output:

MSBuild version 17.11.2+c078802d4 for .NET Framework
Build started 9/2/2024 4:04:27 AM.

Project "Z:\home\mok\ClientGenerator\ClientGenerator.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
  Building solution configuration "Debug|x64".
Project "Z:\home\mok\ClientGenerator\ClientGenerator.sln" (1) is building "Z:\home\mok\ClientGenerator\ClientGenerator\ClientGenerator.vcxproj" (2) on node 1 (default targets).
Z:\home\mok\.vs\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.WindowsSDK.targets(46,5): error MSB8036: The Windows SDK version 10.0.17134.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". [Z:\home\mok\ClientGenerator\ClientGenerator\ClientGenerator.vcxproj]
Done Building Project "Z:\home\mok\ClientGenerator\ClientGenerator\ClientGenerator.vcxproj" (default targets) -- FAILED.
Done Building Project "Z:\home\mok\ClientGenerator\ClientGenerator.sln" (default targets) -- FAILED.

Build FAILED.

"Z:\home\mok\ClientGenerator\ClientGenerator.sln" (default target) (1) ->
"Z:\home\mok\ClientGenerator\ClientGenerator\ClientGenerator.vcxproj" (default target) (2) ->
(_CheckWindowsSDKInstalled target) -> 
  Z:\home\mok\.vs\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.WindowsSDK.targets(46,5): error MSB8036: The Windows SDK version 10.0.17134.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". [Z:\home\mok\ClientGenerator\ClientGenerator\ClientGenerator.vcxproj]

While it's obviously installed.

image

mstorsjo commented 2 months ago

Hmm. In order to have all those separate WinSDK versions in parallel, I presume you have done multiple installs into the same directory tree.

Can you reproduce the same issue if you remove/rename your old ~/.vs directory and do a new fresh install into it, where there presumably only should be one single WinSDK version?

mokurin000 commented 2 months ago

Hmm. In order to have all those separate WinSDK versions in parallel, I presume you have done multiple installs into the same directory tree.

I remember the script failed serveral times because /tmp is too small at the first And after a msiextract missing error ~/.vs was removed, I installed the dependencies and rerun script, everything goes fine

Can you reproduce the same issue if you remove/rename your old ~/.vs directory and do a new fresh install into it, where there presumably only should be one single WinSDK version?

lemme try later