JetBrains / UnrealLink

Apache License 2.0
132 stars 23 forks source link

Installing RiderLink to engine bricks UE5 on Mac #179

Open shadowmint opened 2 years ago

shadowmint commented 2 years ago

After selecting 'Install RiderLink to engine' as per this forum thread: https://forums.unrealengine.com/t/trouble-creating-c-project-in-ue5-ea/232968

It becomes impossible to build any project. Any attempt to build the project will result in:

ERROR: Expecting to find a type to be declared in a module rules named ‘RD’ in UE5Rules

This effectively bricks your installation of UE5. Verify -> no problem. However, attempting any C++ build will result in this error.

Fix

cd /Users/Shared/Epic Games/UE_5.0/Engine/Plugins/Developer
rm -rf RiderLink
rm -rf RiderSourceCodeAccess

Replication

image

For more details:

/Users/Shared/Epic\ Games/UE_5.0/Engine/Build/BatchFiles/Mac/GenerateProjectFiles.sh -project `pwd`/Jam.uproject -game
open ./Jam.xcworkspace

Now attempt to run the project:

Setting up bundled DotNet SDK
Processing build for Target=JamEditor Platform=Mac Configuration=Development -architecture=x86_64 /Users/doug/dev/randomjam-2022-04/Jam/Jam.uproject 
Log file: /Users/doug/Library/Application Support/Epic/UnrealBuildTool/Log.txt
Creating makefile for ShaderCompileWorker (no existing makefile)
ERROR: Couldn't find target rules file for target 'ShaderCompileWorker' in rules assembly 'UE5Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
       Location: /Users/Shared/Epic Games/UE_5.0/Engine/Intermediate/Build/BuildRules/UE5Rules.dll
       Target rules found:
Running dotnet Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.dll JamEditor Mac Development /Users/doug/dev/randomjam-2022-04/Jam/Jam.uproject -architecture=x86_64
Log file: /Users/doug/Library/Application Support/Epic/UnrealBuildTool/Log.txt
Using 'git status' to determine working set for adaptive non-unity build (/Users/doug/dev/randomjam-2022-04).
Invalidating makefile for JamEditor (RiderSourceCodeAccess.Build.cs deleted)
ERROR: Expecting to find a type to be declared in a module rules named 'RD' in UE5Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.  This type must derive from the 'ModuleRules' type defined by Unreal Build Tool.
Command /Users/Shared/Epic Games/UE_5.0/Engine/Build/BatchFiles/Mac/XcodeBuild.sh failed with exit code 6

UE5 is now bricked. It cannot compile any project until the plugin is deleted from the engine folder.

Environment

macOS Monterey 12.3.1, Max Studio (2022)

unreal 5.0.1

rider 2022.1.1

DecoyRS commented 2 years ago

Thank you for the detailed description, but this issue is on the Unreal Engine side and I'm sorry that you've spent so much time describing it, because the description really looks great and formatting is top notch... :( Last builds of Rider (not Rider for Unreal Engine) disable option to install plugin to the pre-built Engine. You will still be able to install it to Engine.

What's actually happening? Starting with UE5, Engine started to pack all the Engine plugins into UE5Rules.dll and breaks if it can't find a plugin in this dll. So far I couldn't find a way to generate a new UE5Rules file and the only workaround is to place plugins into Plugins/Marketplace (because there's an exception for this folder to allow thirdparty plugins from marketplace) , but I believe this is not the right place for the RiderLink (though I have plans to have a customizable install location, but priority is really low right now).

shadowmint commented 2 years ago

Fair enough. If this is an issue on the Unreal side, I'm happy for this to be closed.

Last builds of Rider (not Rider for Unreal Engine) disable option to install plugin to the pre-built Engine.

However, I'd point out I'm not using Rider for Unreal Engine, I'm using the full Rider 2022.1.1 with the plugin from the marketplace:

image

...and I assure you, it automatically popups up and asks me to install the plugin into the engine:

image <--- This shouldn't have an 'Install plugin in Engine' option if that breaks unreal.

I definitely feel like (regardless of the issue in Unreal), the plugin should absolutely not suggest any 'one-click' options that permanently render your install of UE5 broken.

alecss131 commented 2 years ago

Not only mac, on windows have same errors If click install to game than another error Unhandled exception: Dependency file "C:\Users\Alex\Documents\Unreal Projects\ForAny\Plugins\Developer\RiderLink\Intermediate\Build\Win64\UnrealEditor\Development\RD\Polymorphic.cpp.json" version ("1.2") is not supported version Microsoft.MakeFile.targets(44, 5): [MSB3073] The command ""C:\Program Files\Epic Games\UE_5.0\Engine\Build\BatchFiles\Build.bat" ForAnyEditor Win64 Development -Project="C:\Users\Alex\Documents\Unreal Projects\ForAny\ForAny.uproject" -WaitMutex -FromMsBuild" exited with code 6. If install to engine, another first Failed to generate project model definition files for "Configuration: Development Editor, Platform: Win64" and second Expecting to find a type to be declared in a module rules named 'RD' in UE5Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null. This type must derive from the 'ModuleRules' type defined by Unreal Build Tool. Microsoft.MakeFile.targets(44, 5): [MSB3073] The command ""C:\Program Files\Epic Games\UE_5.0\Engine\Build\BatchFiles\Build.bat" ForAnyEditor Win64 Development -Project="C:\Users\Alex\Documents\Unreal Projects\ForAny\ForAny.uproject" -WaitMutex -FromMsBuild" exited with code 6.

JetBrains Rider 2022.1.1 Build #RD-221.5591.20, built on April 28, 2022

Unreal Engine 5.0.1 from Epic Launcher