Introduction
In this blog post, we will look at how to upgrade your existing LightSwitch applications to Visual Studio 2013 Preview. In recent blog posts, we introduced some of the cool features available in preview like Enhancements in Solution Explorer, partitioned model files that improves experiences around Team Collaboration on LightSwitch projects, Intrinsic Database Management With Database Projects etc. You can take advantage of all these features by migrating your existing LightSwitch projects forward by means of project upgrade.
Upgrade Experience
For projects created with Visual Studio 2012, you will automatically receive a prompt for upgrade on opening the project on a machine with Visual Studio 2013 preview.
Click OK to begin the Project Upgrade process. Once the upgrade process is completed, you will automatically get the migration report in the browser as well as upgrade logs in the same folder on disk.
Upgrade Details
During Upgrade, the root, client and server projects will undergo a series of migration steps to move your project to latest version. Below, you will find a list of changes that occur during upgrade process
Project | Details |
Root Project | · The .ls proj/.ls3 project file will be upgraded and new project file (.lsx) project file is generated. · LightSwitch version and LightSwitch project version numbers get updated to latest(4.0 and 3.6 respectively) · The project structure for Root, Server and Client projects are upgraded to represent a de-nested project structure. · The Model Files (Client.lsml, Service.lsml) undergo migration to split into partitioned model files. Client.lsml file gets moved to Client project and Service.lsml file gets moved to Server project. Also, every entity, screen, query, data source etc. will have a separate model file. |
Server Project | · References to LightSwitch Assemblies are updated to point to the latest version. · Reference to Microsoft.IdentityModel.Tokens.JWT gets added and the Nuget packages folder has an entry for this. · IIS Settings are updated to set to use IISExpress by default. · .Net Target Framework version is updated from v4.0 to v4.5. |
Client Project | · Jquery, jquery mobile files, .css files located under Application\ HTMLClient\Contents and Application\ HTMLClient\ Scripts folder are updated to the latest runtime version.Default.html file has these updated references. · Project References and references to LightSwitch assemblies are updated. |
If your project is under Source Code Control, then after upgrade, you will find partitioned files for the model included under pending changes along with project files. These files get checked in during the check-in process.
Extensions and Upgrade:
If the LightSwitch project references any custom/third party extensions, these extensions are not automatically upgraded when project upgrade occurs. Many of the popular LightSwitch extensions now support Visual Studio 2013 Preview and 3rd party developers are continuing to add support for more.
Notes:
1. Before Upgrade starts, a backup of the current project is made and stored in Backupfolder located at the same level in the project folder as the solution file (.sln). The user file settings (.suo file) is also backed up.
2. It is a 1 way project upgrade. This means that after upgrade, the project cannot be opened with previous releases of Visual Studio.
If you changeyour mind after upgrade and wantto move back to the previous version of the project, you can open the project (not upgraded) in Backupfolder using Visual Studio 2012.
Known Issues:
Please refer to Release Notes for Visual Studio 2013 Preview for list of any known issues around project upgrade.
Conclusion:
By upgrading your project to the latest preview version, you can utilize all the cool features and enhancements that were announced during the preview release. We would love to hear about your experience in upgrading your existing projects to the latest version of Visual Studio. Please let us know your feedback via LightSwitch forum or by posting a comment below.
Thanks,
Raghuveer Gopalakrishnan, SDET, LightSwitch Team