Quick Tip: Getting LightSwitch Extensions to Install into Visual Studio 2013 Preview
So you want to try out Visual Studio 2013 Preview and test out the awesome new LightSwitch features on your own real projects, but you can’t because your extension(s) won’t install into the VS2013 preview. Here’s a tip on how you can force the extension to install. But first, some background….
Visual Studio LightSwitch extensions are built as VSIX files, just like any other Visual Studio extension. Some extensions are built for specific versions of Visual Studio. The extension author decides what versions are supported when the VSIX is created. Because of this, when we release a preview of the next version of Visual Studio, extensions that you use are probably not available yet for the new version.
When you upgrade a LightSwitch project that uses extensions from one version of Visual Studio to the next, you really should have all the extensions available to the new version of Visual Studio. Less headaches that way :). So you need to install the extensions first, then you can open your LightSwitch Solution in the new version of Visual Studio and it will perform the upgrade smoothly. If you don’t have the extensions installed, you will get a warning and your project will not build correctly until you remove all the references. This can be a major pain if you are using a lot of extensions.
You can force an extension to install into any version of Visual Studio by changing the manifest. However, keep in mind that depending on the extension, it may not work correctly in the new version – ultimately it’s the extension author’s responsibility to upgrade their extension. However, many LightSwitch extensions should migrate just fine, particularly if they are already supporting multiple Visual Studio versions.
Here’s how to do it.
1. Rename the .VSIX extension to .ZIP
2. Extract the contents of the archive and open the .vsixmanifest contained inside with a text editor like notepad
3. Locate the <SupportedProducts> XML element and add version 12.0. i.e:
<SupportedProducts>
<VisualStudio Version="10.0">
<Edition>VSLS</Edition>
</VisualStudio>
<VisualStudio Version="11.0">
<Edition>VSLS</Edition>
</VisualStudio>
< VisualStudio Version="12.0"><br> <Edition>VSLS</Edition><br> </VisualStudio >
</SupportedProducts>
4. Alternately you may see an <InstallationTarget> element instead. Add “12.0” to the version attribute. i.e.
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[11.0,12.0] " />
</Installation>
5. Save the .vsixmanifest, zip up the contents again, and rename the archive with the .vsix extension
6. Double-click the VSIX to install it into all the versions of Visual Studio you have on your system.
Now you should be ready to upgrade your project by opening it in Visual Studio 2013 Preview. I smoke tested the Filter Control, Office Integration Pack and Bing Map Control (available in the Contoso Construction sample) and they seem to be working so far so good.
I hope this helps you start testing your LightSwitch projects in the Visual Studio 2013 preview. I can’t tell you how important it is for us to find bugs sooner than later (especially upgrade issues) so thank you for helping make LightSwitch the best it can be. Remember if you have any feedback, please visit the LightSwitch forum. If you know you’ve found a bug, enter it directly into our bug database here: https://connect.microsoft.com/visualstudio
Enjoy!
Comments
Anonymous
July 18, 2013
That's all well and good for extensions that come as VSIX files but some come as EXE files. E.g. ComponentOne used to sell their LS extensions individually but now they are install as a suite from an EXE. I raised a support topic when VS 2013 Preview was released and am still waiting :-(Anonymous
July 18, 2013
Hi Beth, Any ideas for extensions such as DevExpress XtraReports or ComponentOne Studio for LightSwitch? I can't seem to find a vsix for these and these are the two that are stopping conversion of our major product to VS2013! ThanksAnonymous
July 19, 2013
The comment has been removedAnonymous
October 02, 2013
Some of the extensions when you install have missing information how can we resolve that in Config file.?Anonymous
October 03, 2013
Hi Farhan, What missing information are you referring to?Anonymous
October 14, 2013
Hi Beth, I am using Visual Studio 2013 RC. I want to use the extensions for lightswitch. While I am trying to change the .vsixmanifest then it gives me an error. The .vsixmanifest file is not the root nod or VSIX package is not a valid package. Can you please help to find out the solution?Anonymous
October 14, 2013
Hi Harsh, Sounds like you're not zipping the files back up correctly. The .vsixmanifest file needs to be in the root of the archive, not in a folder underneath. It should be a flat set of files in the zip. HTH, -BethAnonymous
October 24, 2013
The comment has been removedAnonymous
October 25, 2013
If you have 7zip installed (cinst 7zip if you have chocolatey, otherwise www.7-zip.org/download.html to download), you can save couple of steps by editing the vsix contents 'in-place'
- right-click the vsix in explorer, 7zip -> open archive
- in the 7zip window that opens, right-click extension.vsixmanifest -> edit
- make change needed
- exit editor, making sure to let it save
- 7zip will prompt with: File 'extension.vsixmanifest' was modified. Do you want to update it in the archive?
- click 'OK'
- exit 7zip, install vsix :)
Anonymous
November 01, 2013
The VS 2013 version of the LightSwitch Extensibility Toolkit has been released, so no more modification is needed. visualstudiogallery.msdn.microsoft.com/2d204191-90eb-4dfb-831f-cf31513cef06Anonymous
August 08, 2014
This trick didn't work for me... :-(Anonymous
September 30, 2014
Hi Beth, How do I uninstall .vsix controls ? e.g BingMaPControl.vsix Thanks.