How do fix System.AggregrateException error? RRS feed

  • Question

  • After converting/migrating a Visual Studio Lightswitch 2012 project to VS Lightswitch 2015 I get an unhandled exception error "System.AggregrateException' error when I try to publish the project to Azure. The error is generated immediately after selecting "Publish".   The project otherwise seems to work fine. How do I fix this?
    Friday, July 24, 2015 8:11 PM

All replies

  • Hi Mark,

    Could you please give us more detailed information about this error? AggregateException represents one or
    more errors that occure during application execution. We need the InnerException to find out the really exception.

    Best Regards,


    Monday, July 27, 2015 9:21 AM
  • Hi Weiwei,

    Thank you for responding. I understand that the message is vague and incomplete but the only other message that comes up "Build Canceled"  The "Errors", "Warnings" and "Messages" all come up with 0. Is there another place where errors are being captured?  Mark

    Monday, July 27, 2015 9:37 PM
  • Hi Mark,

    Please try with print screen to capture the errors when it occurs. You also can use Snipping Tool to capture the errors.
    Best Regards,

    Tuesday, July 28, 2015 1:46 AM
  •  Hi Weiwie,

    Here is the error box that appears directly after I select Build-->Publish.  No other information or error codes are reported by VS other than "Build Canceled" after selection OK.

    Tuesday, July 28, 2015 3:36 PM
  • Here is the file.  I cannot figure out where the "One or more errors (that) occurred" might be logged.

    Tuesday, July 28, 2015 3:40 PM
  • Hi Mark,

    If the project uses extensions, they must already be installed on the computer where you are performing the upgrade or the upgrade will fail. This requirement includes any extensions that
    the project references but doesn't use. You should remove any unused extensions before you upgrade. For more information, see How to: Add or Remove Extensions

    In addition, please check the UpgradeLog file which in the Solution folder to review it for any errors.

    Best Regards


    Thursday, July 30, 2015 2:29 AM
  • Hi Weiwei

    I uninstalled and removed all extensions (I was never using them in the project anyway) from the original computer and VS before I zipped it up and transferred it to my new setup with VS2015.  Same results. Here is the upgradelog File.  There are a bunch of warnings that I don't know what to do about. Thank you, Mark

    you errors. 

    Thursday, July 30, 2015 9:17 PM
  • Instead of VS2015 I migrated the project with VS2013.  This time when I select publish I get a little more information but still cannot figure out where to go.  The certificate is configured in the wizard that is crashing. 

    Thursday, July 30, 2015 9:43 PM
  • Hi Mark,

    Based on your last error message, it seems caused by the certificate. Please try remove the certificate in the old version of your application which let your application can run without certificate correctly. Then try to upgrade the project and configure certificate.
    Best Regards,

    • Proposed as answer by Angie Xu Friday, August 7, 2015 2:49 AM
    Monday, August 3, 2015 8:55 AM
  • I have the same problem.

    The solution i found was:

    Goto menú File->Account settings and then clic on the "remove" link of the azure account in the All Accounts area.

    Finaly the error disapear when the publish wizard sart, and the wizard ask again for the azure account information.



    • Edited by prnet Wednesday, September 2, 2015 2:33 AM
    • Proposed as answer by ADefwebserver Wednesday, September 2, 2015 3:57 AM
    Wednesday, September 2, 2015 2:32 AM
  • Regarding the System.AggregateException error while attempting a VS Lightswitch 2015 publish, I tried the various the solutions listed in this tread to no avail. What finally worked for me was changing the client from Web to Desktop, perform a publish, then change back to Web.

    Change Client to Desktop


    Thursday, March 2, 2017 1:25 PM