Reputation: 6797
In Lightswitch it is possible to publish the app on the desktop with a local database also on the same computer. In Lightswitch 2012 the publishing wizard asks for a valid user connection string. In Lightswitch 2011 this was more easy because this input was not necessary. In this scenario it was easy to test the login and the users and roles-management.
what is a "valid user connection string", why do I now (compared to LS11) have to input this, where to get information about my right user connection string?
Thanks in advance
PS: of course I already had installed MS SQL Server 2012, nevertheless I reinstalled it again, also SqllocalDB. But it's still the same.
when I publish the app, and when I try to start it, it says something like: "Error during communication with the database" .
Upvotes: 2
Views: 4830
Reputation: 6797
I noticed there are many views on this post.
OK since VS 2012 Update 2, in Lightswitch I go with project version 3.
pv1: LS 2011
pv2: VSLS 2012
pv3: VSLS 2012-with project upgrade
Right click your project in project Explorer and from the menu select the menu item "Project-Upgrade"
publishing your project (pv3) to your desktop is very easy again.
I can not give a detailed description in english, because my VS is not english, please have a look at the Microsoft How-To Videos from Beth Massi.
Upvotes: 1
Reputation: 6797
In the Lightswitch Publish Application Wizard
-> Click the button "Publish"
Go to the directory you defined for your app ("C:\MyProjectname\") and start setup.exe.
the database "ApplicationDatabase.mdf" will be created under the folder "Application Files\bin\Data".
Now you can start your app and test the login and the users and roles management screens.
Upvotes: 3
Reputation: 1848
If you have SQL Express installed on your machine then the server name should be ".\SQLExpress"
If you only have LocalDB installed, the server name should be "(LocalDB)\v11.0"
Upvotes: 6
Reputation: 635
In lightswitch 2012, when you use the publish wizard you need to specify two connection strings regardless of application type:
Here is a link to have further reading about lightswitch deployment: Distributing and Maintaining Your Application
Upvotes: 1