C++ Projects named "Test", "Development" etc will not package properly

(This contains extra info on UE-74975)

An acquaintacne ran into UE-74975 the other day: If you name your project “Test”, “Development” or a couple of other things, then UnrealBuildTool fails building it with the error message “ERROR: No target name was specified on the command-line.”.

This command line will fail:

"E:\Program Files\Epic Games\UE_4.22\Engine\Binaries\DotNET\UnrealBuildTool.exe" Test Win64 Development -Project=c:\temp\Test\Test.uproject  c:\temp\Test\Test.uproject -NoUBTMakefiles  -remoteini="c:\temp\Test" -skipdeploy -Manifest=c:\temp\Test\Intermediate\Build\Manifest.xml -NoHotReload -log="C:\Users\Kalms\AppData\Roaming\Unreal Engine\AutomationTool\Logs\E+Program+Files+Epic+Games+UE_4.22\UBT-Test-Win64-Development.txt"

This command line will succeed:

"E:\Program Files\Epic Games\UE_4.22\Engine\Binaries\DotNET\UnrealBuildTool.exe" Test2 Win64 Development -Project=c:\temp\Test2\Test2.uproject  c:\temp\Test2\Test2.uproject -NoUBTMakefiles  -remoteini="c:\temp\Test2" -skipdeploy -Manifest=c:\temp\Test2\Intermediate\Build\Manifest.xml -NoHotReload -log="C:\Users\Kalms\AppData\Roaming\Unreal Engine\AutomationTool\Logs\E+Program+Files+Epic+Games+UE_4.22\UBT-Test2-Win64-Development.txt"

The root of the problem is that UBT expects you to list platforms, target configurations, and targets, without any prefixes.
If the user happens to name a target to the exact name of one of the platforms or target configurations, then UBT will treat that commandline parameter as a platform/target configuration instead of as a target.

This problem would be avoided if UBT also supported argument switches for the targets, i.e. a “-Targets=” syntax, in addition to the current syntax. Once UBT supports that, and UE4 Editor uses that syntax, then the problem is eliminated for the common case of new users using UE4 and building their projects from within the editor.