locked
Could not load file or assembly 'Microsoft.LightSwitch, Version=10.0.11.3 RRS feed

  • Question

  • I've been developing a Lightswitch application for about two weeks now and everything has been going well. All of the sudden this morning, something went wrong that I can't figure out. I changed a column name in the external database from isAdmin to IsAdmin and updated the datasource.

    First the metadata layer appeared to get confused and it prevented us from updating screens properly. Then, after rolling back the coding changes, I started getting the error below when running the application. Any idea what is going on?

    Could not load file or assembly 'Microsoft.LightSwitch, Version=10.0.11.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

    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.FileNotFoundException: Could not load file or assembly 'Microsoft.LightSwitch, Version=10.0.11.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
    Stack Trace:
    [FileNotFoundException: Could not load file or assembly 'Microsoft.LightSwitch, Version=10.0.11.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.]
       Microsoft.LightSwitch.WebHost.Implementation.LightSwitchHttpModule.Init(HttpApplication application) +0
       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
    
    [HttpException (0x80004005): Could not load file or assembly 'Microsoft.LightSwitch, Version=10.0.11.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9873784
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
    
     

     

    Jay Turpin


    • Edited by Jay Turpin Thursday, May 16, 2013 12:54 PM
    Wednesday, May 15, 2013 3:32 AM

Answers

  • Update: I think I figure out the issue. At one point last week, we unchecked the build action on the parent project:

    

    Once we turned this option back on, the error went away


    Jay Turpin

    • Marked as answer by Jay Turpin Thursday, May 16, 2013 12:54 PM
    Thursday, May 16, 2013 12:54 PM

All replies

  • In Solution Explorer, click on the toolbar button at the top and select File View in the pull down menu.  Then expand the <Project>/<Project>.Server/References node.  Make sure “Microsoft.LightSwitch” is there and if you select it and look in the Properties window, “Copy Local” should be set to true.  If it’s not there, Add a Reference to it by right-clicking the References node and select “Add Reference”.
     
    -- David
     

    Efficiently read and post to forums with newsreaders: http://communitybridge.codeplex.com
    Wednesday, May 15, 2013 9:53 PM
  • Update: I think I figure out the issue. At one point last week, we unchecked the build action on the parent project:

    

    Once we turned this option back on, the error went away


    Jay Turpin

    • Marked as answer by Jay Turpin Thursday, May 16, 2013 12:54 PM
    Thursday, May 16, 2013 12:54 PM