locked
Visual studio 2013 preview Lightswitch publish to azure error "Could not load file or assembly 'Microsoft.WindowsAzure.ServiceRuntime" RRS feed

  • Question

  • Deployed the project from Visual Studio 2013 Preview. It was successful, but when trying to access the site, I got an error:

    Server Error in '/' Application.

    Could not load file or assembly 'Microsoft.WindowsAzure.ServiceRuntime, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)


    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.WindowsAzure.ServiceRuntime, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.WindowsAzure.ServiceRuntime, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.

    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
    

    Stack Trace:

    [FileLoadException: Could not load file or assembly 'Microsoft.WindowsAzure.ServiceRuntime, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
       Microsoft.LightSwitch.BaseServices.Logging.Utilities.HostEnvironment.RunningInAzureCore() +0
       Microsoft.LightSwitch.BaseServices.Logging.Utilities.HostEnvironment.RunningInAzure() +108
       Microsoft.LightSwitch.BaseServices.Logging.Utilities.HostEnvironment.get_IsEncryptionRequired() +24
       Microsoft.LightSwitch.WebHost.Implementation.LightSwitchHttpModule.Init(HttpApplication application) +21
       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +418
       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296


    jl

    Friday, August 30, 2013 2:22 AM

Answers

  • I find out that by recreating Azure web site will resolve this issue. I guess the Azure web site has a deployment from previous Visual Studio.

    jl

    • Marked as answer by Joe Lee Friday, August 30, 2013 3:32 AM
    Friday, August 30, 2013 3:31 AM
  • I find the answer by recreating the Azure web site. I guess it might due to the Azure web site has previous deployment from previous Visual Studio

    jl

    • Marked as answer by Joe Lee Friday, August 30, 2013 3:36 AM
    Friday, August 30, 2013 3:36 AM

All replies

  • I find out that by recreating Azure web site will resolve this issue. I guess the Azure web site has a deployment from previous Visual Studio.

    jl

    • Marked as answer by Joe Lee Friday, August 30, 2013 3:32 AM
    Friday, August 30, 2013 3:31 AM
  • I find the answer by recreating the Azure web site. I guess it might due to the Azure web site has previous deployment from previous Visual Studio

    jl

    • Marked as answer by Joe Lee Friday, August 30, 2013 3:36 AM
    Friday, August 30, 2013 3:36 AM