ScriptGeneratorUbtPlugin.dll not found when upgrade 5.02 project to 5.1

Hello, I have a problem when updating the version of the project to 5.1.
I get this message every time I try to rebuild the project and it is not possible to open it after the update.

1>Creating makefile for Test_ProjectEditor (no existing makefile)
1>Unhandled exception: System.IO.FileNotFoundException: Could not load file or assembly 'D:\Unreal\UE_5.1\Engine\Binaries\DotNET\UnrealBuildTool\Plugins\ScriptGeneratorUbtPlugin\ScriptGeneratorUbtPlugin.dll'. The system cannot find the path specified.
1>File name: 'D:\Unreal\UE_5.1\Engine\Binaries\DotNET\UnrealBuildTool\Plugins\ScriptGeneratorUbtPlugin\ScriptGeneratorUbtPlugin.dll'
1>   at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)
1>   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
1>   at System.Reflection.Assembly.LoadFile(String path)
1>   at EpicGames.UHT.Utils.UhtTables.LoadAssembly(String assemblyFilePath) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\Shared\EpicGames.UHT\Utils\UhtTables.cs:line 551
1>   at EpicGames.UHT.Utils.UhtTables.IsUhtPlugin(String assemblyFilePath) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\Shared\EpicGames.UHT\Utils\UhtTables.cs:line 521
1>   at UnrealBuildTool.UEBuildTarget.SetupUbtPlugins(ILogger Logger) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildTarget.cs:line 3781
1>   at UnrealBuildTool.UEBuildTarget.SetupPlugins(ILogger Logger) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildTarget.cs:line 3531
1>   at UnrealBuildTool.UEBuildTarget.PreBuildSetup(ILogger Logger) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildTarget.cs:line 2677
1>   at UnrealBuildTool.UEBuildTarget.Create(TargetDescriptor Descriptor, Boolean bSkipRulesCompile, Boolean bForceRulesCompile, Boolean bUsePrecompiled, ILogger Logger) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildTarget.cs:line 857
1>   at UnrealBuildTool.BuildMode.CreateMakefile(BuildConfiguration BuildConfiguration, TargetDescriptor TargetDescriptor, ISourceFileWorkingSet WorkingSet, ILogger Logger) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 741
1>   at UnrealBuildTool.BuildMode.Build(List`1 TargetDescriptors, BuildConfiguration BuildConfiguration, ISourceFileWorkingSet WorkingSet, BuildOptions Options, FileReference WriteOutdatedActionsFile, ILogger Logger, Boolean bSkipPreBuildTargets) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 275
1>   at UnrealBuildTool.BuildMode.Execute(CommandLineArguments Arguments, ILogger Logger) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 242
1>   at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 648
========== Rebuild All: 1 succeeded, 0 failed, 1 skipped ==========

When I delete the source and plugins folder, the project opens fine but when I create another c++ class in 5.1 the project fails again and gives me the same error.
when i create a new project in 5.1 and create a new c++ class everything works normal but i am worried that the error will appear again. Is it possible to know where I can find that dll or some other solution?

I’m seeing the same failure:

Unhandled exception: System.IO.FileNotFoundException: Could not load file or assembly ‘C:\Program Files\Epic Games\UE_5.1\Engine\Binaries\DotNET\UnrealBuildTool\Plugins\ScriptGeneratorUbtPlugin\ScriptGeneratorUbtPlugin.dll’. The system cannot find the path specified.

I installed 5.1 from the Launcher with all options enabled, but no other platforms (Android, etc.) installed. Windows Desktop is implicit.

To update my existing 5.0.3 game project, I switched versions from 5.0 to 5.1 via File Explorer RCLICK on the .uproject, and that triggers a re-generation of the VS project files. In other words, this issue is a BLOCKER for people who have a C++ game project but use a binary UE installation (do not build the Engine).

So what needs to be done to fix or work around this? Is there some way we can escalate this so Epic devs are even aware of it?

Update for my situation: I had the ‘Script Plugin’ enabled in my project, and that appeared to be the root cause of ‘ScriptGeneratorUbtPlugin.dll not found’ issue. Perhaps ‘Script Plugin’ doesn’t even apply to projects based on a binary distribution…

So after a removing the reference to that plugin, and a few C++ project code modifications due to UE_50 → UE51 changes, the project is building again, in Visual Studio 2022 w/ v142 toolchain.

2 Likes

Thanks! that resolve my problem too. I have not touched any plugin since I created the project so that plugin came activated by default.
I think these type of plugins should not come activated by default.

1 Like