string AppGuid = ((GuidAttribute)Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(GuidAttribute), false).GetValue(0)).Value.ToString();
What is going to hinder your debugging, and therefore make your code unsupportable, is that you're chaining (cramming) all these method and property calls in a single statement. NEVER DO THIS!! It makes your code difficult to debug since you cannot see the intermediate return values being passed down the chain and cannot see where the problem occurs.
As for why the code is failing, does your app even have a GUID? Open the Properties node of your project in Solution Explorer, click on the Application tab, then on the "Assembly Information..." button. In the dialog that appears, is the GUID field filled in with a VALID guid? For example: 69D69F94-225B-4B31-B149-04E8A1183D05