Sharing the goodness…
Beth Massi is a Senior Program Manager on the Visual Studio team at Microsoft and a community champion for business application developers. Learn more about Beth.
More videos »
A new video was just released on the Developer Center video page:
How Do I: Deploy a Visual Studio LightSwitch Application?
I originally did this one for Beta 1 but now this updated with the latest Beta 2 release. In this video you will learn about what deployment options you have for a LightSwitch Application and why you should choose one over the other. I show you how to set up your database and deploy a 2-tier application as well as how to set up and deploy a 3-tier application onto a web server running Internet Information Services (IIS).
Also check out the following walkthroughs for more information on deployment:
I’ve been busy travelling and speaking at conferences but I managed to get this one done. :-) And I just got my Azure account set up (YAY!) so I’ll be planning on doing one on deploying to Azure next (once I get back from DevDays).
Nice video... well done.
One small comment would be that using Trusted DB connection for two tier isn't harder to maintain. You can grant access to a Windows domain group and have IT manage what users are in that group. This would be more secure than using a shared SQL username/password. I hope the username/password is encrypted on the clients config file?
Question... how do you publish an upgrade or version 2 that has database schema changes? Does the publish wizard use and of DataDudes change management or create change scripts? Can you point me to how this will work?
Point taken on the integrated security but in a two-tier situation I'd argure that the business doesn't have an IT department at all. In the case I showed, LightSwitch can set everything up for you.
Yes the wizard can generate change scripts or update the database directly. On the Database configuration page of the publish wizard you indicate whether you want to create a new database or update an existing one.
The excerpt below is from your tutorial on LightSwitch Deployment referencing IIS 7,
"you should be able to open a browser to http://localhost and see the IIS 7 logo. If that doesn’t happen something got hosed in your install and you should troubleshoot that in the IIS forums or the LightSwitch forums"
Troubleshooting this issue with the Forums has not resolved the issue that I have, I believe I have performed all of the required steps to make IIS7 to work properly e.g. display Local Host page. A IIS 7 tutorial for LigntSwitch would be nice to have, or if there is a current one, I have not been able to find it on MSDN.
Please advise - thanks.
@Scott -- I wrote up a deployment guide here:
Do you have a link to your forum thread?
visual studio lightswitch 2013 an application is not deploy on iis7 (use sql server 2014)
C:\Program Files\MSBuild\Microsoft\VisualStudio\LightSwitch\v4.5\Publish\v2.2\Microsoft.LightSwitch.Publish.targets(1565,9): error : An exception occurred when deploying the database for the application. Could not deploy package.
Condition=" '$(ExecuteSchemaDeploy)' == 'true' ">
Condition=" '$(CreateSqlUser)' == 'true' and '$(SqlUserName)' != 'sa' " />
Trying to publish database to a SQL server 2008 R2 Database, it is a 2 tier deployment. whatever approach i am using "Directly publish" or "generating SQL script" it is giving me below error respectively:
For direct Publish:
------ Build started: Project: CAFelatte.Server, Configuration: Release Any CPU ------
CAFelatte.Server -> C:\Users\asriva4\Desktop\Hydra CAF Project\E2 Publish\CAFelatte\CAFelatte\CAFelatte.Server\bin\Release\Application.Server.dll
------ Build started: Project: CAFelatte.DesktopClient, Configuration: Release Any CPU ------
CAFelatte.DesktopClient -> C:\Users\asriva4\Desktop\Hydra CAF Project\E2 Publish\CAFelatte\CAFelatte\CAFelatte.DesktopClient\Bin\Release\CAFelatte.DesktopClient.dll
Begin application manifest generation
Application manifest generation completed successfully
------ Build started: Project: CAFelatte, Configuration: Release Any CPU ------
------ Publish started: Project: CAFelatte, Configuration: Release Any CPU ------
Not signing the Xap file.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v4.5\Publish\v2.2\Microsoft.LightSwitch.Publish.targets(1565,9): error : An exception occurred when deploying the database for the application.
An error occurred during deployment plan generation. Deployment cannot continue.
Done building project "CAFelatte.lsxtproj" -- FAILED.
========== Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
for generating SQL script:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v4.5\Publish\v2.2\Microsoft.LightSwitch.Publish.targets(634,9): error : An exception occurred when building the database for the application.
========== Build: 1 succeeded, 0 failed, 2 up-to-date, 0 skipped ==========