Michael
Michael

Reputation: 1879

LightSwitch -- Target database schema provider could not be determined

In Visual Studio 2010 I create a new LightSwitch project.

On the "start with data" screen I click "create new table" link.

I name and add a couple columns, I add one form and then run the project and I get this exception:

An exception occurred when building the database for the application. The target database schema provider could not be determined. Deployment cannot continue.

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v1.0\Microsoft.LightSwitch.targets

Seems simple yet it doesn't work.

How can I specify the target database schema or get around this error?

Upvotes: 5

Views: 3269

Answers (1)

Ralph Willgoss
Ralph Willgoss

Reputation: 12163

What version of SQL Server are you using?
I've seen people have this issue with SQL Server 2012 (Denali).

Can you try with SQL Server Express 2008 or 2008 R2?

You can have multiple instances of SQL Server Express installed, however only one should be running.

Ensure your SQL Express instance, has user instance enabled, which is required by LightSwitch:

  1. Open the SQL Server Management Studio.
  2. Connect the SQL Express instance.
  3. In the query editor type this: exec sp_configure 'user instances enabled', 1
  4. Then type: Reconfigure
  5. Then restart the SQL Server database.

How to change the database:

  1. Open Visual Studio LightSwitch
  2. Select the Tools -> Options menu item
  3. Enable Show all settings checkbox in the Options dialog
  4. Expand the Database Tools group and select the Data Connections options page
  5. Check the setting of the option SQL Server Instance Name (blank for default)

See this article for some more discussion on this topic.

Upvotes: 3

Related Questions