Trying to build AWS Gamelift 5 in VS 2022 Error MSB8066


I am currently trying to get AWS Gamelift up an running on my windows 11 PC with visual Studio 22 as per this guide

I am running into an issue where I get an MSB8066 error related to these folder locations C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5): error MSB8066: Custom build for E:\GameDesign\GameLift-SDK-Release-4_13_2023\GameLift-Cpp-ServerSDK-5.0.2\out\CMakeFiles\8e4189e333e9cc0be6feecf8c63550b3\clang-format-configure.rule; E:\GameDesign\GameLift-SDK-Release-4_13_2023\GameLift-Cpp-ServerSDK-5.0.2\out\CMakeFiles\8e4189e333e9cc0be6feecf8c63550b3\clang-format-build.rule; E:\GameDesign\GameLift-SDK-Release-4_13_2023\GameLift-Cpp-ServerSDK-5.0.2\out\CMakeFiles\8e4189e333e9cc0be6feecf8c63550b3\clang-format-install.rule; E:\GameDesign\GameLift-SDK-Release-4_13_2023\GameLift-Cpp-ServerSDK-5.0.2\out\CMakeFiles\04a6c2d1e5e457d707c0e45b76a5d721\clang-format-complete.rule; E:\GameDesign\GameLift-SDK-Release-4_13_2023\GameLift-Cpp-ServerSDK-5.0.2\out\CMakeFiles\7b004e7e43af61887ed5e22ab3bda222\clang-format.rule’ exited with code 1

This leads me to believe that the problem is CMake. I did a cmake debug run cmake E:\GameDesign\GameLift-SDK-Release-4_13_2023\GameLift-Cpp-ServerSDK-5.0.2\out -G “Visual Studio 17 2022” -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=E:\GameDesign\GameLift-SDK-Release-4_13_2023\GameLift-Cpp-ServerSDK-5.0.2\out\CMakeFiles

and got this error CMake Warning at CMakeLists.txt:74 (message): Detected a Windows Shared STD/NOSTD or Unreal build. Skipping unit tests

I need some help on figuring out what exactly the above message means so that I can complete this build.

asked a year ago552 views
2 Answers
Accepted Answer


I'm attempting to reproduce the issue. Some things I've found so far that you might try, and some follow up questions if those suggestions do not work.

For the cmake warning on line 74:

-- Detecting CXX compile features - done
CMake Warning at CMakeLists.txt:74 (message):
  Detected a Windows Shared STD/NOSTD or Unreal build.  Skipping unit tests

This is expected. This just means that because you are doing a build for Unreal, the unit tests are not being added to the solution.

Looking into MSB8066. There are some things for you to try based on previous times we have seen this error.

First, make sure you have downloaded and installed the full version of OpenSSL, link can be found here . Make sure to install the full version (for reference Once you have done that, then you need to add the following environmental variables, note that your path might be different so please verify after the install:

  OPENSSL_INCLUDE_DIR = "C:\Program Files\OpenSSL-Win64\include"
  OPENSSL_LIBRARIES = "C:\Program Files\OpenSSL-Win64\lib"
  OPENSSL_ROOT_DIR = "C:\Program Files\OpenSSL-Win64"

Try running cmake again, followed by the build and see if this resolves the issue.

Second thing to try/verify is that when you are running your build command, make sure the version of msbuild in your path matches VS2022. To verify this you can check your PATH variable in environmental variables and look for the msbuild path.

If neither of those suggestions work, then would you please add the following info to help us dive deeper into the issue:

  • What version of CMake? (For reference I used cmake version 3.21.4 to build. You can find your version by typing cmake --version in the command line)
  • What version of OpenSSL? (For reference I used OpenSSL 3.1. You can find this in the changes.txt file in your OpenSSL folder)
  • What is the full command you are creating the VS2022 SLN with. (I used: cmake -G "Visual Studio 17 2022" -DBUILD_FOR_UNREAL=1 ..)
  • What is your build command. (I used: msbuild ALL_BUILD.vcxproj /p:Configuration=Release)
  • Are you experiencing the same issue if you build by opening the solution in VS2022 and do a rebuild on ALL_BUILD project?
  • I built using the 05_11_2023 release, would you mind trying with this release instead to see if this resolves the issue?
  • Would you mind including a paste of the complete output when running cmake.
answered a year ago

Thanks for the Info. Adding the OpenSSL directories and the msbuild.exe directiory to Environment Variables PATH fixed the issue.

answered a year ago
  • So when working with the AWS GameLift SDK 5.0 here are a few things to keep in mind.

    a. Get OpenSSL from here Win32/Win64 OpenSSL Installer for Windows - Shining Light Productions choose the Latest version Win64 OpenSSL v3.1.1(DO NOT use Light) b. Install OpenSSL c. Add the OpenSSL directories to the PATH in EnvironmentVariables

    OPENSSL_INCLUDE_DIR = "C:\Program Files\OpenSSL-Win64\include" OPENSSL_LIBRARIES = "C:\Program Files\OpenSSL-Win64\lib" OPENSSL_ROOT_DIR = "C:\Program Files\OpenSSL-Win64" Make sure you have the directory to msbuild.exe to the PATH in EnvironmentVariables C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin a. Make sure you are in the Visual Studio(version) Development Command Prompt. b. cd to C:\GameLift-SDK-Release-05_11_2023\GameLift-Cpp-ServerSDK-5.0.3( or where ever you have it) Then use the commands

    mkdir out cd out cmake -G “Visual Studio 17 2022” -DBUILD_FOR_UNREAL=1 … msbuild ALL_BUILD.vcxproj /p:Configuration=Release

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions