Home > LightSwitch > How to Change Development Database in LightSwitch

How to Change Development Database in LightSwitch


Last week I had an issue building my LightSwitch project on Windows 8 instance because it had SQL 11 express instance as the default DB instance on the computer. I then installed SQL Server 2008 R2 Express on the machine to make it build.

You may have noticed that LightSwitch doesn’t provide an intuitive way to change the instance of the Dev database. I have done the following to connect to the SQL Server 2008 R2 instance

Right click on the LS project

Unload project

Right click the project and click edit

Find SqlExpressInstanceName attribute

Replace the database instance with one you want to connect to. In my case, I replaced

<SqlExpressInstanceName>SQLEXPRESS</SqlExpressInstanceName>

With

<SqlExpressInstanceName>SQLEXPRESS2k8</SqlExpressInstanceName>

Right click the project and reload

Advertisements
Categories: LightSwitch Tags:
  1. Roger
    September 9, 2012 at 11:35 pm

    Thanks very much. It helped me greatly.

  2. Muhammad Idrees
    May 19, 2014 at 3:14 am

    Thanks, great tip. It solves my problem.

  1. October 4, 2011 at 12:16 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: