I’m running Visual Studio 2010 SP1. When I try to package an Azure application (right-click a WebRole, click Package…) it begins to package the application, spits out a few things into the log, then Visual Studio vanishes. It simply disappears. No error, no nothing. It’s just gone.
Here’s the log output from VS before the vanishing act:
------ Build started: Project: MyWebApp, Configuration: Release Any CPU ------
MyWebApp -> D:\MyWebApp-trunk\src\MyWebApp\bin\MyWebApp.dll
------ Build started: Project: MyWebApp-WebRole, Configuration: Release Any CPU ------
------ Publish started: Project: MyWebApp-WebRole, Configuration: Release Any CPU ------
Transformed web.config using Web.Release.config into obj\Release\TransformWebConfig\transformed\web.config.
Looking at the /bin/Release folder of the webrole, the package is obviously not complete (the ServiceConfiguration.cfg is there, but the /app.publish/MyWebApp-WebRole.cspkg file is 0kb).
I’m not sure where to look to see what went wrong. Any idea why this happens and/or where I might find some diagnostic information?
“Sudden App Death” is usually caused by an unhandled exception in a background thread. If there’s no exception trap in the outermost thread function, the exception will reach the default exception trap for the thread which immediately kills the process. No warning, no message, just poof! it’s gone.
Other than working around whatever data or environmental thing sets off this exception in the packaging run, this can really only be fixed in code. Be sure to report it as a bug on Microsoft Connections. And post a link to that bug here so other devs who find this SO question can bump up the vote on the bug report and see the resolution eventually.