Dave Noderer's Blog

February 2013 Entries

Problems getting Lightswitch HTML Client Preview 2

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…


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

Visual Studio 2012 change source control

Note to self… when changing source control on a solution you need to remove the workspace associated with the old source control, connect to the new server and add / check in to the new server.

This is after frustratingly “change source control” which will unbind but not allow you to rebind / connect to a different server.

SkyDrive for South Florida Code Camp!

We held out 9th annual South Florida Code Camp on 2/9/2013. Unlike past years, instead of stuffing bags with brochures and papers from the vendors, we bought 700 2gb USB keys and had all the vendors send us information, software, links and files to put on the USB key.

This was a great success.. but how about making it public too?

I setup a folder on my skydrive:


Then I renamed the new folder, selected it and clicked on the sharing button at the top:



By clicking on “People with a view link” I created a link I could share with all the code camp attendees to allow them access to the content. If you click on “Shorten” you will be a very usable and short link. After you copy the link, you can click on “Done” and distribute or post the link.

Then I realized there was more I could put there. Besides the USB content from sponsors I created directories for the speakers and a place to put all the photos we collect.


This was quick and easy, now I’m wondering why I did not do this before!

Feel free to browse the code camp skydrive here with the shortened link: http://sdrv.ms/122eAdh