I dabble in a variety of technologies and have found several great uses for Visual Studio LightSwitch. Recently I was building a quick website site (HTMLClient) for admins to maintain some data in a database but had a ton of trouble because I wasn’t able to start debugging.
When I clicked “Start Debugging” in Visual Studio 2015:
- No browser popped up
- Even if I launched a browser, I could load the site but Visual Studio wasn’t ‘attached’ so I couldn’t hit any breakpoints
- I saw the error below in the debugger events window
Unexpcted Exception During Runtime Startup:System.IO.FileNotFoundException: Could not load file or assembly 'msshrtmi, Version=188.8.131.52, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.File name: 'msshrtmi, Version=184.108.40.206, Culture=neutral, PublicKeyToken=31bf3856ad364e35' at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeEnvironment() at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment..cctor()=== Pre-bind state information ===LOG: DisplayName = msshrtmi, Version=220.127.116.11, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (Fully-specified)
After digging into this problem (what’s gone wrong?), it turns out that LightSwitch isn’t able to launch the Edge browser correctly! To switch back to Internet Explorer as a default browser, open the “Settings” app, search for “Default Apps”, and choose “Internet Explorer” for the default Web Browser. Once you do this, “Start Debugging” works correctly again with Visual Studio LightSwitch!