Dave Noderer's Blog

South Florida does .NET!

  Home  |   Contact  |   Syndication    |   Login
  201 Posts | 0 Stories | 362 Comments | 28 Trackbacks

News

Twitter












Tag Cloud


Article Categories

Archives

Post Categories

Image Galleries

.NET Community

Life at the Beach

My Blog Friends

I finally downloaded the html client preview 2 to give it a run, had not had a chance to look at Lightswitch since last summer…

http://blogs.msdn.com/b/lightswitch/archive/2012/11/12/announcing-lightswitch-html-client-preview-2.aspx

I ran into a few problems…

When trying to create a Silverlight html/c# client I got a dialog box:

Before installing this version of Silverlight, please close all browser windows and uninstall the current version of Silverlight.

Installed version: 5.1.10516.0

Requested version: Silverlight 5 (5.1.10411.0)

I un-installed the newer version of Silverlight, installed the recommended version and got past that error.. I searched around and did not see this problem in the forums but could have easily missed it…

A couple of other minor problems but then was stuck with a build error indicating Lightswitch could not access the localdb\v11.0:

Error    1    An error occurred while establishing a connection to SQL Server instance '(LocalDB)\v11.0'.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Error occurred during LocalDB instance startup: SQL Server process failed to start.
)    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets    146    10    ContosoMoving

After learning more than I wanted to about localdb over a couple of days, what was consistent were errors of this kind shown below from the localdb log if I let Lightswitch create the localdb\v11.0 instance:

FCB::Open failed: Could not open file e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\MSDBData.mdf for file number 0.  OS error: 2(The system cannot find the file specified.).

Note: I don’t have an E drive normally, these might be remnants of an installation disk.

These logs and the database system and other files can be found here: C:\Users\{your user name}\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0 on my Windows 8 installation.

Although localdb\v11.0 was created, I could not connect to (localdb)\v11.0 via sql management studio (or visual studio).

Final solution was to delete what was there and create / test (LocalDB)\V11.0 before trying to start/compile a Lightswitch project.

To delete an existing V11.0 and create a new one use the sqllocaldb (.exe) utility which should be mapped already if you use you visual studio developer command prompt. The sequence I used was:

cd c:\users….\Instances (see full directory above).

delete the v11.0 directory

run this sequence of commands:

sqllocaldb delete v11.0

sqllocaldb create v11.0

sqllocaldb start v11.0

After I verified I could connect to the localdb\v11.0 then I was able to run Lightswitch without problems.

Dave Noderer

Software Developer / Microsoft MVP

Cell: 954-270-1186

Company: http://www.computerways.com

Win Phone Beach Riser Pro: http://bit.ly/BeachRiserPro

posted on Tuesday, February 26, 2013 1:36 PM