locked
upgrade from lightswitch 2011 to lightswitch 2012 runtime error RRS feed

  • Question

  • Hello,

    I have VS 2010 and lightswitch 2011 installed as well as VS2012 Update 4 installed. I have upgraded my Lightswitch project from 2010 version to VS2012 . I can compile but when I try to run the site it gets stuck in loading with the following errors in the debug window:

    1) No valid exports were found that match the constraint '((exportDefinition.ContractName == "Microsoft.LightSwitch.Client.IConcurrencyErrorHandler") AndAlso (exportDefinition.Metadata.ContainsKey("ExportTypeIdentity") AndAlso "Microsoft.LightSwitch.Client.IConcurrencyErrorHandler".Equals(exportDefinition.Metadata.get_Item("ExportTypeIdentity"))))', invalid exports may have been rejected.
    
    Resulting in: Cannot set import 'Microsoft.LightSwitch.Runtime.Shell.Internal.Implementation.ConcurrencyExceptionHandler.concurrencyErrorHandler (ContractName="Microsoft.LightSwitch.Client.IConcurrencyErrorHandler")' on part 'Microsoft.LightSwitch.Runtime.Shell.Internal.Implementation.ConcurrencyExceptionHandler'.
    Element: Microsoft.LightSwitch.Runtime.Shell.Internal.Implementation.ConcurrencyExceptionHandler.concurrencyErrorHandler (ContractName="Microsoft.LightSwitch.Client.IConcurrencyErrorHandler") -->  Microsoft.LightSwitch.Runtime.Shell.Internal.Implementation.ConcurrencyExceptionHandler -->  TypeCatalog (Types='Microsoft.LightSwitch.Runtime.Shell.Implementation.UserSettingsService, Microsoft.LightSwitch.Runtime.Shell.Implementation.Standard.ActiveScreenMonitor, ...').
    
    System.ComponentModel.Composition Warning: 1 : The ComposablePartDefinition 'Microsoft.LightSwitch.Runtime.Shell.Internal.Implementation.DefaultScreenErrorHandler' has been rejected. The composition remains unchanged. The changes were rejected because of the following error(s): The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.
    
    1) No valid exports were found that match the constraint '((exportDefinition.ContractName == "Microsoft.LightSwitch.Runtime.Shell.Internal.IRuntimeMessageBoxService") AndAlso (exportDefinition.Metadata.ContainsKey("ExportTypeIdentity") AndAlso "Microsoft.LightSwitch.Runtime.Shell.Internal.IRuntimeMessageBoxService".Equals(exportDefinition.Metadata.get_Item("ExportTypeIdentity"))))', invalid exports may have been rejected.
    
    Resulting in: Cannot set import 'Microsoft.LightSwitch.Runtime.Shell.Internal.Implementation.ScreenErrorHandlerBase.MessageBoxService (ContractName="Microsoft.LightSwitch.Runtime.Shell.Internal.IRuntimeMessageBoxService")' on part 'Microsoft.LightSwitch.Runtime.Shell.Internal.Implementation.DefaultScreenErrorHandler'.
    Element: Microsoft.LightSwitch.Runtime.Shell.Internal.Implementation.ScreenErrorHandlerBase.MessageBoxService (ContractName="Microsoft.LightSwitch.Runtime.Shell.Internal.IRuntimeMessageBoxService") -->  Microsoft.LightSwitch.Runtime.Shell.Internal.Implementation.DefaultScreenErrorHandler -->  TypeCatalog (Types='Microsoft.LightSwitch.Runtime.Shell.Implementation.UserSettingsService, Microsoft.LightSwitch.Runtime.Shell.Implementation.Standard.ActiveScreenMonitor, ...').
    
    System.ComponentModel.Composition Warning: 1 : The ComposablePartDefinition 'Microsoft.LightSwitch.Runtime.Shell.Internal.Implementation.ScreenExecutableErrorHandler' has been rejected. The composition remains unchanged. The changes were rejected because of the following error(s): The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.
    
    1) No valid exports were found that match the constraint '((exportDefinition.ContractName == "Microsoft.LightSwitch.Runtime.Shell.Internal.IRuntimeMessageBoxService") AndAlso (exportDefinition.Metadata.ContainsKey("ExportTypeIdentity") AndAlso "Microsoft.LightSwitch.Runtime.Shell.Internal.IRuntimeMessageBoxService".Equals(exportDefinition.Metadata.get_Item("ExportTypeIdentity"))))', invalid exports may have been rejected.
    
    Resulting in: Cannot set import 'Microsoft.LightSwitch.Runtime.Shell.Internal.Implementation.ScreenErrorHandlerBase.MessageBoxService (ContractName="Microsoft.LightSwitch.Runtime.Shell.Internal.IRuntimeMessageBoxService")' on part 'Microsoft.LightSwitch.Runtime.Shell.Internal.Implementation.ScreenExecutableErrorHandler'.
    Element: Microsoft.LightSwitch.Runtime.Shell.Internal.Implementation.ScreenErrorHandlerBase.MessageBoxService (ContractName="Microsoft.LightSwitch.Runtime.Shell.Internal.IRuntimeMessageBoxService") -->  Microsoft.LightSwitch.Runtime.Shell.Internal.Implementation.ScreenExecutableErrorHandler -->  TypeCatalog (Types='Microsoft.LightSwitch.Runtime.Shell.Implementation.UserSettingsService, Microsoft.LightSwitch.Runtime.Shell.Implementation.Standard.ActiveScreenMonitor, ...').
    
    System.ComponentModel.Composition Warning: 1 : The ComposablePartDefinition 'Microsoft.LightSwitch.Runtime.Shell.Internal.Implementation.VisualCollectionErrorHandler' has been rejected. The composition remains unchanged. The changes were rejected because of the following error(s): The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.
    
    1) No valid exports were found that match the constraint '((exportDefinition.ContractName == "Microsoft.LightSwitch.Runtime.Shell.Internal.IRuntimeMessageBoxService") AndAlso (exportDefinition.Metadata.ContainsKey("ExportTypeIdentity") AndAlso "Microsoft.LightSwitch.Runtime.Shell.Internal.IRuntimeMessageBoxService".Equals(exportDefinition.Metadata.get_Item("ExportTypeIdentity"))))', invalid exports may have been rejected.

    Some posting i have found with the same error suggests it is related to WCF services installation/ registry configuration error. any ideas of how to resolve this ?

    Tuesday, July 8, 2014 7:46 PM

Answers

  • Hi Nutthinee,

    Welcome to Lightswitch forum.

    There is similar thread about upgrading from lightswitch 2011 to lightswitch 2012 runtime error, and it is related to  WCF services, there is extension existed in the LS application.

    For LS application upgrade issue, you may need to perform several tasks before you upgrade a LightSwitch project. First, you should make sure that you can open and successfully build the project in the earlier version of LightSwitch. If the project has errors, the upgrade is likely to fail.

    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.

    When you try to open a project that was created in an earlier version of LightSwitch, the Review Project and Solution Changes dialog box appears. If your solution contains additional projects, you can view their status by choosing the Show additional projects link.

    After you choose the OK button, the project files will be converted to the new format, and the project will appear in Solution Explorer. A backup copy of the original project will be saved in a Backup folder under the Solution folder. In addition, an UpgradeLog file will be created in the Solution folder. This file contains information about the changes that were made and any further modifications that you may need to perform. 

    Regards


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Angie Xu Monday, July 14, 2014 9:56 AM
    • Marked as answer by Angie Xu Thursday, July 31, 2014 8:20 AM
    Monday, July 14, 2014 9:55 AM

All replies

  • Hi Nutthinee,

    Welcome to Lightswitch forum.

    There is similar thread about upgrading from lightswitch 2011 to lightswitch 2012 runtime error, and it is related to  WCF services, there is extension existed in the LS application.

    For LS application upgrade issue, you may need to perform several tasks before you upgrade a LightSwitch project. First, you should make sure that you can open and successfully build the project in the earlier version of LightSwitch. If the project has errors, the upgrade is likely to fail.

    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.

    When you try to open a project that was created in an earlier version of LightSwitch, the Review Project and Solution Changes dialog box appears. If your solution contains additional projects, you can view their status by choosing the Show additional projects link.

    After you choose the OK button, the project files will be converted to the new format, and the project will appear in Solution Explorer. A backup copy of the original project will be saved in a Backup folder under the Solution folder. In addition, an UpgradeLog file will be created in the Solution folder. This file contains information about the changes that were made and any further modifications that you may need to perform. 

    Regards


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Angie Xu Monday, July 14, 2014 9:56 AM
    • Marked as answer by Angie Xu Thursday, July 31, 2014 8:20 AM
    Monday, July 14, 2014 9:55 AM
  • Hello,

    the 2011 Lightswitch  (earlier version) was upgraded successfully according to the log file that got generated. The earlier version compiled and run successfully as well. The only thing I didn't do was to upgrade the installed extensions to use the 2012 Extension development toolkit. do I need to?  also, if it is a wcf service issue, what is the register key for the wcf services? do you recommend the approach that the other person did which was to remove the wcf service register key and reimport in the correct register key?

    Monday, July 14, 2014 1:21 PM
  • The only thing I didn't do was to upgrade the installed extensions to use the 2012 Extension development toolkit. do I need to? 

    For upgrading from lightswitch 2011 to lightswitch 2012, as mentioned above, if the project uses extensions, they must already be installed on the computer where you are performing the upgrade or the upgrade will fail.

    Regards


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, July 21, 2014 12:14 PM