Question

How do you handle the deployment of a LightSwitch application into a production environment? i.e. the LS application has been developed, but it now needs to be installed first into Test, and then into Live.

We don't want to use the "manual" approach, i.e. use the Visual Studio Build / Publish option, rather we want to automate the deployment.

Was it helpful?

Solution

My feeling is that deployment is one of the real weak points of LightSwitch. If you are using the very simple deployment model that is build into the product, and you're doing everything within a Windows domain, the publishing wizard can do everything. But if you're deviating from the model at all LightSwitch will fight you. I'd really like to see an "advanced" deployment option that provided some configurability.

Here's how I solved the problem you're having with LightSwitch applications that are targeting web deployment:

  1. At the beginning of the project, deploy once to each target environment using the publish wizard. This is the easiest way to get the database set up.
  2. As new builds are deployed, use the publish wizard to deploy to a deployment package to a standard location on the local development machine.
  3. The deployment package is just a zip file, so you can open it an drill down to where the actual binary release is. I use a powershell script to copy the binary files out of the the deployment package and in to a local SVN working directory. Note that you must not copy web.config file during this step.
  4. Check the unpacked binary files into SVN and use SVN to manage the deployment.
  5. Manage schema changes with SQL scripts.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top