none
Migrate VS LightSwitch 2012 Apllication into VS 2013 RRS feed

  • Question

  • Hi,

    I have created the lightswitch application on LightSwitch 2011 and then migrated into VS 2012 successfully. Now, I need to migrate the application into VS 2013 but after migration,  I was getting so many compilation error and I have resolved almost all compilation errors but, now getting many run time errors. I am also using below lightswitch extension in my application,
    •ElylsExtensions
    •ImageButtonExtension
    •VBLSTreeviewControl
    •Microsoft.LightSwitch.Toolkit

    Below is the errors I am getting at runtime. Please suggest the right way to resolved these errors.

    Thanks in advance.

    1.System.IO.FileLoadException occurred
      Message=Could not load file or assembly 'Microsoft.LightSwitch, Version=10.0.12.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The requested assembly
     version conflicts with what is already bound in the app domain or specified in the manifest. (Exception from HRESULT: 0x80131053)
      StackTrace:
           at Microsoft.LightSwitch.BaseServices.Configuration.Utilities.SilverlightClientSettings.EnsureConfigXmlInitialized()
           at Microsoft.LightSwitch.BaseServices.Configuration.Utilities.SilverlightClientSettings.get_SubsystemPackages()

    2. System.Reflection.TargetInvocationException occurred
      Message=Exception has been thrown by the target of an invocation.
      StackTrace:
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
           at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
      InnerException: System.IO.FileLoadException
           Message=Could not load file or assembly 'Microsoft.LightSwitch, Version=10.0.12.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
     The requested assembly version conflicts with what is already bound in the app domain or specified in the manifest. (Exception from HRESULT: 0x80131053)
           StackTrace:
                at Microsoft.LightSwitch.BaseServices.Configuration.Utilities.SilverlightClientSettings.EnsureConfigXmlInitialized()
                at Microsoft.LightSwitch.BaseServices.Configuration.Utilities.SilverlightClientSettings.get_SubsystemPackages()
                at Microsoft.LightSwitch.Runtime.Shell.Implementation.App.LoadAppConfig()
                at Microsoft.LightSwitch.Runtime.Shell.Implementation.App..ctor()
     
    3.  System.TypeLoadException occurred
         Message: A first chance exception of type 'System.TypeLoadException' occurred in mscorlib.dll
         Additional information: Type     'Microsoft.LightSwitch.ServerGenerated.Implementation.IServerDataServiceImplementationCore' from assembly 'Microsoft.LightSwitch.Base.Server,
     Version=11.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is attempting to implement an inaccessible interface.

    4.  System.IO.FileNotFoundException occurred
     Message: A first chance exception of type 'System.IO.FileNotFoundException' occurred in Microsoft.WindowsAzure.ServiceRuntime.dll
    Additional information: Could not load file or
     assembly 'msshrtmi, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

    5.  System.IO.FileNotFoundException occurred
     Message: A first chance exception of type 'System.IO.FileNotFoundException' occurred in Microsoft.WindowsAzure.ServiceRuntime.dll
    Additional information: Could not load file or
     assembly 'msshrtmi, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

    6.  System.TypeInitializationException occurred
     Message: A first chance exception of type 'System.TypeInitializationException' occurred in Microsoft.LightSwitch.Server.dll
    Additional information: The type initializer for
     'Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment' threw an exception.

    7.  System.Configuration.ConfigurationErrorsException occurred
       Message: A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll
    Additional information: This element is not
     currently associated with any context

    8.  System.ServiceModel.CommunicationException occurred
     Message: A first chance exception of type 'System.ServiceModel.CommunicationException' occurred in System.ServiceModel.DomainServices.Hosting.dll
    Additional information: No channel
     should ever be opened with this host.

    9.  System.NullReferenceException occurred
      Message: A first chance exception of type 'System.NullReferenceException' occurred in Microsoft.VisualStudio.Diagnostics.ServiceModelSink.dll
    Additional information: Object
     reference not set to an instance of an object.

    Tuesday, April 14, 2015 10:03 AM

Answers

  • HI Gautam,

    If you upgrade your LightSwitch extension projects to Visual Studio 2013, you need modify the following items:

    • Modify the Lspkg Project File
    • Modify the Client Project File
    • Modify the Client.Design Project File
    • Modify the Common Project File
    • Modify the Design Project File
    • Modify the Server Project File
    • Modify the VSIX Project File

    check out Upgrading LightSwitch Extension Projects to Visual Studio 2013 for more information.

    Best regards,

    Angie


    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.

    • Marked as answer by Angie Xu Monday, April 27, 2015 1:30 PM
    Wednesday, April 15, 2015 7:07 AM