error when build in unreal 5.5 - ScriptGeneratorUbtPlugin

i had this error when i try to migrate a project to unreal 5.5

C:\Program Files\Epic Games\UE_5.5\Engine\Plugins\ScriptPlugin\Source\ScriptGeneratorUbtPlugin\ScriptCodeGeneratorBase.cs(50,30,50,37): error CS1061: 'UhtModule' does not contain a definition for 'Package' and no accessible extension method 'Package' accepting a first argument of type 'UhtModule' could be found (are you missing a using directive or an assembly reference?)
9>C:\Program Files\Epic Games\UE_5.5\Engine\Plugins\ScriptPlugin\Source\ScriptGeneratorUbtPlugin\ScriptCodeGeneratorBase.cs(50,46,50,53): error CS1061: 'UhtModule' does not contain a definition for 'Package' and no accessible extension method 'Package' accepting a first argument of type 'UhtModule' could be found (are you missing a using directive or an assembly reference?)
9>Done building project "ScriptGeneratorUbtPlugin.ubtplugin.csproj" -- FAILED.

I replace this file in line 50 :
C:\Program Files\Epic Games\UE_5.5\Engine\Plugins\ScriptPlugin\Source\ScriptGeneratorUbtPlugin

QueueClassExports(module.Package, module.Package, classes, tasks);

by this

QueueClassExports(module.ScriptPackage, module.ScriptPackage, classes, tasks);

I am a newbie in c++ so I am not sure if it right but it worked for me
hope it’s help someone

2 Likes

it worked for me too, thank you so much!!!

it’s true, I create a new C++ project in Editor and also has this compile error.