Skip to content

Cannot generate godot.sln for Rider under MacOS #83771

Description

@p10tr3k

Godot version

4.1

System information

MacOS 14.0 (23A344) (intel)

Issue description

According to documentation, to use Rider IDE I have to run this command:
scons platform=windows arch=x86_64 target=editor vsproj=yes dev_build=yes

And I get this error:
Invalid target platform "windows". The following platforms were detected: ios macOS

Seems reasonable because I am using MacOS, so I tried this:
scons platform=osx arch=x86_64 target=editor vsproj=yes dev_build=yes

and this gives me another error:
'Error: The vsproj option is only usable on Windows with Visual Studio.'

Is there a way to build godot.sln for Rider under MacOS?

Steps to reproduce

See above

Minimal reproduction project

not required

Activity

  1. bruvzg commented on Oct 23, 2023

    @bruvzg
    Member

    vsproj is specifically for MSVC build on Windows. For any other platform/compiler use, you can use compile_commands.json (compiledb=yes in the build command).

  2. p10tr3k commented on Oct 24, 2023

    @p10tr3k
    ContributorAuthor

    vsproj is specifically for MSVC build on Windows. For any other platform/compiler use, you can use compile_commands.json (compiledb=yes in the build command).

    Rider runs on both Mac and Windows platforms, and it uses solely .sln files from the msbuild system. There has to be a way to generate these files on Mac, as Rider is currently the most preferred option (for me), especially after the gradual discontinuation of Visual Studio for Mac.

  3. brno32 commented on Nov 26, 2023

    @brno32
    Contributor

    I don't think this is a bug but a feature request. running scons vsproj=yes on MacOS should indeed throw the given error since it's not (yet) supported

  4. akien-mga commented on May 13, 2024

    @akien-mga
    Member

    Could you test if this works out of the box in the current master branch?

    We improved the VS proj generation with #84885.

    I suspect the new system may still not support Rider, but it might be possible to implement Rider support using the framework @shana designed, IIUC.

  5. moved this from Untriaged to Up for grabs in Buildsystem Issue Triageon May 13, 2024
  6. shana commented on May 14, 2024

    @shana
    Contributor

    So after talking to Jetbrains about this, the conclusion is that Rider doesn't support the vcxproj (C++) project format. It does support .sln, but only for csproj (C#) projects. The alternative is to use a json project format that Rider does support (ubisoft/Sharpmake#248).

  7. TV4Fun commented on Jun 27, 2024

    @TV4Fun
    Contributor

    @akien-mga I am running a mac with the latest master branch of Godot. I've generated the project files with scons dev_build=yes debug_symbols=yes module_mono_enabled=yes vsproj=yes. Loading in Rider or building with msbuild produces this error:

    "/Users/jcroteau/code/godot/godot.sln" (default target) (1) ->
    "/Users/jcroteau/code/godot/godot.vcxproj" (default target) (2) ->
      /Users/jcroteau/code/godot/godot.vcxproj(59,3): error MSB4019: The imported project "/Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "/Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
    

    Rider also completely fails to find any of the standard or project include files, so none of its code analysis tools work. See this screenshot from variant_utility.cpp:
    Screenshot 2024-06-27 at 3 26 31 PM

  8. citizenmatt commented on Aug 22, 2024

    @citizenmatt

    Just to clarify, Rider does support .vcxproj files, but not on Mac, because it requires the appropriate Visual C++ target files, and the VC++ toolchain isn't available for Mac. Rider works with Unreal Engine on Mac by loading the .uproject files directly, and using them to generate an internal project model. To work with other C++ projects on Mac and Linux, the only option right now is to use CLion, which is designed to work with CMake and compilation database.

    (It might seem odd to have two products here, but it's a result of evolution. Rider was initially designed to work with dotnet solutions, which is a Visual Studio project model, and is powered by the ReSharper engine, a Visual Studio plugin. ReSharper C++ had better support for Unreal than CLion, so it was easier to integrate ReSharper C++ than teach CLion the VS project model as well as Unreal features. Plus, Unreal solutions are described with C#, which is again a better fit for Rider)

  9. van800 commented on Feb 23, 2025

    @van800
    Contributor

    I have made the changes to the build scripts to supoort Mac, Linux and Windows mingv
    #103405

    • cut out the MS Cpp targets, which don't exist outside Windows.
    • added some stuff to resolve types from MacOS SDK
    • made small changes to help run-cconfiguration be auto-generated
    • fixed PreprocessorDefinitions and AdditionalIncludeDirectories
    • small fix for run/debug, now it works

    All the analysis in Rider works fine, debugging in Rider works.

    Image
  10. added this to the 4.5 milestone on Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions