No explicit msvc version requested, autodetecting version.
'**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.6.4
** Copyright (c) 2022 Microsoft Corporation
'**********************************************************************
[vcvarsall.bat] Environment initialized for: ‘x64’
Compiler Detection successful, detected VS2022
Building blender with VS2022 for x64 in C:\Users\Triangle4\Desktop\Blender\blender..\build_windows_x64_vc17_Release
– Selecting Windows SDK version 10.0.20348.0 to target Windows 10.0.19045.
CMake Error at build_files/cmake/platform/platform_win32.cmake:49 (message):
Compiler is unsupported, MSVC 2022 17.6.x has codegen issues and cannot be
used to build blender. Please use MSVC 17.5 for the time being.
Call Stack (most recent call first):
CMakeLists.txt:1102 (include)
if I try building after installing msvc 17.5 by using optional switches 2022b I get this error:
make 2022b
Visual Studio 2022 not found (try with the ‘verbose’ switch for more information)
Visual Studio is detected but no suitable installation was found.
Check the “Desktop development with C++” workload has been installed.
*If you are attempting to use either Visual Studio Preview version or the Visual C++ Build tools, Please see ‘make help’ on how to opt in to those toolsets. *
Visual Studio 2022 not found (try with the ‘verbose’ switch for more information)
How can I select the msvc compiler 17.5 as it tells me to in the error?
But vswhere.exe is kicking out an empty string, which doesn’t make any sense.
When i just call vswhere.exe on its own, I get this output:
Copyright (C) Microsoft Corporation. All rights reserved.
instanceId: f215bf73 installDate: 1/10/2023 3:03:17 PM installationName: VisualStudio/17.6.4+33815.320 installationPath: C:\Program Files\Microsoft Visual Studio\2022\Community installationVersion: 17.6.33815.320 productId: Microsoft.VisualStudio.Product.Community productPath: C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe state: 4294967295 isComplete: 1 isLaunchable: 1 isPrerelease: 0 isRebootRequired: 0 displayName: Visual Studio Community 2022 description: Powerful IDE, free for students, open-source contributors, and individuals channelId: VisualStudio.17.Release
*channelUri: removed due to the new user link limit on this forum enginePath: C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service installedChannelId: VisualStudio.17.Release
*installedChannelUri: removed due to the new user link limit on this forum
*releaseNotes: removed due to the new user link limit on this forum
*thirdPartyNotices: removed due to the new user link limit on this forum updateDate: 2023-06-26T07:05:33.7710849Z catalog_buildBranch: d17.6 catalog_buildVersion: 17.6.33815.320 catalog_id: VisualStudio/17.6.4+33815.320 catalog_localBuild: build-lab catalog_manifestName: VisualStudio catalog_manifestType: installer catalog_productDisplayVersion: 17.6.4 catalog_productLine: Dev17 catalog_productLineVersion: 2022 catalog_productMilestone: RTW catalog_productMilestoneIsPreRelease: False catalog_productName: Visual Studio catalog_productPatchVersion: 4 catalog_productPreReleaseMilestoneSuffix: 1.0 catalog_productSemanticVersion: 17.6.4+33815.320 catalog_requiredEngineVersion: 3.6.2115.31769 properties_campaignId: properties_channelManifestId: VisualStudio.17.Release/17.6.4+33815.320 properties_nickname: properties_setupEngineFilePath: C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe
You added the older compilers to your existing VS 17.6 installation, sadly that’s not gonna won’t work as the version detected of VS will still be 17.6.
You’re gonna have to grab the 17.5 build tools installer from their release page and install that.
Yeah gotta admit, i’m not thrilled with the 17.6 black list, but they left us no choice, a blender build with 17.6 cannot be trusted near anyone’s data. It’s that bad…
Worst kind of compiler bug, the code compiles just fine, but when you run it, it does something slightly different than what the source code told it to do, so all seems fine, but it won’t behave like it should.
if you want technical details the upstream ticket is over here:
In case this helps anyone, I had some trouble getting MSVC 17.5 to work for me - not sure if I incorrectly downgraded or needed to do something else. I was however able to install Visual Studio Preview (microsoft.com) and after using make with vs2022pre as an argument (“make 2022pre full pydebug verbose”) it successfully built Blender. Not sure if it was required, but before installing the preview version of MSVC I uninstalled Visual Studio and related build tools.
Good to hear you got it to work, maybe they fixed the preview recently?
To get the 17.5 to work, you need to have the full version of vs installed, and the 17.5 build tools with c++ desktop development checked as well.
If you have 17.6 or later you can refer to the @Andrew_Burke ‘s solution to configure the MSVC 2022 install. In the cmd you should configure the version by doing this
It probably that the error output has been written in the CMake build files. Today I use git to pull the code with the 17.6 the cmake reports the error.
Apparently, Microsoft says that in august they released a version with it fixed. has anyone tried?
yes 17.7/17.8 no longer 40% of our tests fail, we’re down to a single test now because of a different problem I’d still recommend sticking to 17.5 for now.