Packaging Error (4.6): Exception in mscorlib: Buffer cannot be null

Repro Steps:

(Using Unreal Engine 4.6)
File | Package Project | Build Configuration | Development
File | Package Project | Windows | Windows (64-bit)

Result:

InternalUtils.SafeCreateDirectory: SafeCreateDirectory C:\Users\\Documents\HBO\Tobin\Interactive\WightStripes\Intermediate\Staging
InternalUtils.SafeFileExists: SafeFileExists C:\Users\\Documents\HBO\Tobin\Interactive\WightStripes\Build\Windows\Application.ico=False
BuildCommand.Execute: ERROR: BUILD FAILED
Program.Main: ERROR: AutomationTool terminated with exception:
Program.Main: ERROR: Exception in mscorlib: Buffer cannot be null.
Parameter name: buffer
Stacktrace:    at System.IO.MemoryStream..ctor(Byte[] buffer, Boolean writable)
   at GroupIconResource.FromByteArray(Byte[] GroupData, ModuleResourceLibary Module)
   at GroupIconResource.FromExe(String FileName)
   at BaseWinPlatform.StageBootstrapExecutable(DeploymentContext SC, String TargetFile, String StagedRelativeTargetPath, String StagedArguments)
   at BaseWinPlatform.GetFilesToDeployOrStage(ProjectParams Params, DeploymentContext SC)
   at Win64Platform.GetFilesToDeployOrStage(ProjectParams Params, DeploymentContext SC)
   at Project.CreateStagingManifest(ProjectParams Params, DeploymentContext SC)
   at Project.CopyBuildToStagingDirectory(ProjectParams Params)
   at BuildCookRun.DoBuildCookRun(ProjectParams Params)
   at BuildCommand.Execute()
   at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
   at AutomationTool.Automation.Process(String[] CommandLine)
   at AutomationTool.Program.MainProc(Object Param)
   at AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param)
   at AutomationTool.Program.Main()
Program.Main: ERROR: Buffer cannot be null.
Parameter name: buffer

Workaround

Manually copy an icon to C:\Users\Documents\HBO\Tobin\Interactive\WightStripes\Build\Windows\Application.ico before packaging.

That will result in a success package being built (although with the warning “Lighting needs to be rebuilt (34 unbuilt objects”).

This worked for me. Thanks!