So I have Unreal Engine 4.21.2, built from sources using
Visual Studio 2015 14.0 toolchain and Windows 10.0.17763.0 SDK
The problem is:
When I start packaging my project, I get this error:
UATHelper: Packaging (Windows (64-bit)): CSC : warning CS1685: The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll' [D:\EpicGames\UE4_SRC\Engine\Source\Programs\Au
tomationTool\Gauntlet\Gauntlet.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): Framework\FileLockInfo.cs(19,68): error CS1525: Invalid expression term '' [D:\EpicGames\UE4_SRC\Engine\Source\Programs\AutomationTool\Gauntlet\Gauntlet.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): Framework\FileLockInfo.cs(19,69): error CS1003: Syntax error, ':' expected [D:\EpicGames\UE4_SRC\Engine\Source\Programs\AutomationTool\Gauntlet\Gauntlet.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): Framework\FileLockInfo.cs(19,82): error CS1002: ; expected [D:\EpicGames\UE4_SRC\Engine\Source\Programs\AutomationTool\Gauntlet\Gauntlet.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): Framework\FileLockInfo.cs(19,82): error CS1525: Invalid expression term ']' [D:\EpicGames\UE4_SRC\Engine\Source\Programs\AutomationTool\Gauntlet\Gauntlet.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): Framework\FileLockInfo.cs(19,84): error CS1525: Invalid expression term '.' [D:\EpicGames\UE4_SRC\Engine\Source\Programs\AutomationTool\Gauntlet\Gauntlet.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): Framework\FileLockInfo.cs(19,85): error CS1003: Syntax error, ':' expected [D:\EpicGames\UE4_SRC\Engine\Source\Programs\AutomationTool\Gauntlet\Gauntlet.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): Framework\Gauntlet.TestExecutor.cs(354,15): error CS0136: A local variable named 'StartTime' cannot be declared in this scope because it would give a different meaning to 'StartTime', which is already used in a 'parent or current' scope to denote something else [D:\EpicGames\UE4_SRC\Engine\Source\Programs\Automation
Tool\Gauntlet\Gauntlet.Automation.csproj]
BUT, if I open my project with VS and “Rebuild” the Gauntlet.Automation for same platform I packaging my project, the packaging process works normal, but only ONCE. So if I change something in my project and try repackage it, I get the same error, until I rebuilt this module with VC again.
My Question is: Can someone help me understand, why my Gauntlet.Automation.dll get corrupted each time I package my project?
Confirming problem SOLVED on UE 4.22.2 with VS 2019 16.1.1
If you are using GitHub version of UE and have same issue, update your sources to recompile the editor together with updating your vs.
Big thanks to all developers for resolving this annoying problem!!