Building with Visual Studio Build Tools 2022

Is building Blender with ‘Visual Studio Build Tools 2022’ (including the ‘Desktop Development with C++’ workload) but without the entirety of ‘Visual Studio Community 2022’ supported?
Considering the substantial size of Visual Studio, and the fact that I’m developing in VS Code, I assumed I would only require the build tools.

I have a fresh install of Windows 11, installed the development tools as per the docs (apart from the above substitution) and am running C:\Users\chris\Documents\blender-git\blender>make update. The output of that is the following:

Warning: Python not found, there is likely an issue with the library folder
No explicit msvc version requested, autodetecting version.
Compiler Detection failed. Use verbose switch for more information. 
Visual Studio not found (try with the 'verbose' switch for more information)

Extra info:

python --version
Python 3.10.2

svn --version
svn, version 1.14.1-SlikSvn (SlikSvn/1.14.1)

cmake --version
cmake version 3.22.2

git --version
git version 2.34.1.windows.1

@LazyDodo might be something you know off the top of your head! :crossed_fingers:

while it is supported, by default it will look for the standard version of VS. you can force it to look for the build tools by adding 2022b to all your make.bat invocations

Got it, thanks for the quick reply. As I understand, any make * command becomes make 2022b * and things should work? Seems like make 2022b update is working so far.

As I understand, any make * command becomes make 2022b * and things should work?

That is correct, given you’re clearly doing cli builds switching to ninja will likely get your some build time improvements. just install ninja somewhere in the path and use make ninja 2022b full rather than make full

4 Likes

I’m getting this error, is this another thing where I just need to provide an argument somewhere?

$ ./make.bat 2022b debug
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.0.6
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
Building blender with VS2022 for x64 in C:\blender-git-2\blender\..\build_windows_x64_vc17_Debug
CMake Error: Could not create named generator Visual Studio 17 2022

Generators
* Visual Studio 16 2019        = Generates Visual Studio 2019 project files.
                                 Use -A option to specify architecture.
  Visual Studio 15 2017 [arch] = Generates Visual Studio 2017 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 12 2013 [arch] = Generates Visual Studio 2013 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 11 2012 [arch] = Generates Visual Studio 2012 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 10 2010 [arch] = Generates Visual Studio 2010 project files.
                                 Optional [arch] can be "Win64" or "IA64".
  Visual Studio 9 2008 [arch]  = Generates Visual Studio 2008 project files.
                                 Optional [arch] can be "Win64" or "IA64".
  Borland Makefiles            = Generates Borland makefiles.
  NMake Makefiles              = Generates NMake makefiles.
  NMake Makefiles JOM          = Generates JOM makefiles.
  MSYS Makefiles               = Generates MSYS makefiles.
  MinGW Makefiles              = Generates a make file for use with
                                 mingw32-make.
  Green Hills MULTI            = Generates Green Hills MULTI files
                                 (experimental, work-in-progress).
  Unix Makefiles               = Generates standard UNIX makefiles.
  Ninja                        = Generates build.ninja files.
  Ninja Multi-Config           = Generates build-<Config>.ninja files.
  Watcom WMake                 = Generates Watcom WMake makefiles.
  CodeBlocks - MinGW Makefiles = Generates CodeBlocks project files.
  CodeBlocks - NMake Makefiles = Generates CodeBlocks project files.
  CodeBlocks - NMake Makefiles JOM
                               = Generates CodeBlocks project files.
  CodeBlocks - Ninja           = Generates CodeBlocks project files.
  CodeBlocks - Unix Makefiles  = Generates CodeBlocks project files.
  CodeLite - MinGW Makefiles   = Generates CodeLite project files.
  CodeLite - NMake Makefiles   = Generates CodeLite project files.
  CodeLite - Ninja             = Generates CodeLite project files.
  CodeLite - Unix Makefiles    = Generates CodeLite project files.
  Eclipse CDT4 - NMake Makefiles
                               = Generates Eclipse CDT 4.0 project files.
  Eclipse CDT4 - MinGW Makefiles
                               = Generates Eclipse CDT 4.0 project files.
  Eclipse CDT4 - Ninja         = Generates Eclipse CDT 4.0 project files.
  Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files.
  Kate - MinGW Makefiles       = Generates Kate project files.
  Kate - NMake Makefiles       = Generates Kate project files.
  Kate - Ninja                 = Generates Kate project files.
  Kate - Unix Makefiles        = Generates Kate project files.
  Sublime Text 2 - MinGW Makefiles
                               = Generates Sublime Text 2 project files.
  Sublime Text 2 - NMake Makefiles
                               = Generates Sublime Text 2 project files.
  Sublime Text 2 - Ninja       = Generates Sublime Text 2 project files.
  Sublime Text 2 - Unix Makefiles
                               = Generates Sublime Text 2 project files.

"Configuration Failed"

your cmake version doesn’t support vs2022, update it to a newer version and you’ll be ok