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

Bug Report: Can't detect correct version of visual studios. #17456

Open
Cef-e0001 opened this issue Feb 1, 2024 · 2 comments
Open

Bug Report: Can't detect correct version of visual studios. #17456

Cef-e0001 opened this issue Feb 1, 2024 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/blocker Highest priority. Must be actively worked on right now as it is blocking other work. sig/build Categorizes an issue or PR as relevant to SIG Build. sig/core Categorizes an issue or PR as relevant to SIG Core triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@Cef-e0001
Copy link

Describe the bug
I just downloaded from the website. I can't build a newly created project as it says that I don't have compatible version of visual studio installed while I actually have 2 of them which are all compatible.

Steps to reproduce

  1. Create new project
  2. Try to build a project the first time.
  3. See error

Expected behavior
New project is built.

Actual behavior
A dialog pops up saying "Visual Studio 2019 version 16.11 or higher or Visual Studio 2022 version 17.0 or higher not found."

Screenshots/Video
image

Desktop/Device (please complete the following information):

  • Device: Labtop
  • OS: Windows 11
  • Version 22621.3007
  • CPU AMD Ryzen 5 3500U
  • GPU Radeon Vega Mobile Gfx
  • Memory 24GB
@Cef-e0001 Cef-e0001 added kind/bug Categorizes issue or PR as related to a bug. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 1, 2024
@dKumin8
Copy link

dKumin8 commented Feb 6, 2024

Hi! I had the same problem, but I was able to fix it by doing everything according to the instructions.
image
https://www.docs.o3de.org/docs/welcome-guide/requirements/

@lemonade-dm lemonade-dm added sig/build Categorizes an issue or PR as relevant to SIG Build. sig/core Categorizes an issue or PR as relevant to SIG Core triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/blocker Highest priority. Must be actively worked on right now as it is blocking other work. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 7, 2024
@lemonade-dm
Copy link
Contributor

This issue is caused by the Project Manager code to detect the MSVC compiler on Windows.

A workaround for now is to use to command line to generate a build solution for Windows. This supports both the MSVC compiler or Clang for Windows compiler.

CMake can be configured for a project by using the windows-default CMake Configure Preset.

D:\your-project-dir> cmake --preset windows-default

The build can be then be performed by running the windows-editor CMake Build Preset

D:\your-project-dir> cmake --build --preset editor

The actual fix is to remove the code that tries to detect Visual Studio at all, as that is not needed for detection of the compiler that O3DE can use on Windows.
CMake already detects the compiler when configuring, so the vswhere detection code is unnecessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/blocker Highest priority. Must be actively worked on right now as it is blocking other work. sig/build Categorizes an issue or PR as relevant to SIG Build. sig/core Categorizes an issue or PR as relevant to SIG Core triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

3 participants