Installing Silverlight 1.0 Templates on Visual Studio 2008 Beta 2 (Orcas)
If you are playing with Silverlight 1.0 and Visual Studio 2008 like I am, you’ve probably noticed that the templates won’t install without Visual Studio 2005. Luckily there is a good workaround. The templates are a simple .zip file inside the MSI installer that just need to be placed in a specific directory to work…that’s all. If you want to walk through specific steps to get the templates to work with Visual Studio 2008, follow these steps:
- To open the MSI file you need a way to extract the right file. “MSIEXEC -a” doesn’t work because the MSI file will fail with pre-requisites. My suggestion is to use Less MSIerable. This tool allows you to open an MSI file and extract specific files.
- Using the tool, open the SL10Template.msi file in the Silverlight SDK directory (usually “C:\program files\Microsoft Silverlight 1.0 SDK”).
- Choose the “Extract Files” tab and pick the SilverlightJSApplication.zip.
- You will want to open your personal template directory. This is usually “c:\Documents and Settings\USERNAME\My Documents\Visual Studio 2008\Templates\ProjectTemplates\Visual C#” for non-Vista and “C:\Users\USERNAME\Documents\Visual Studio 2008\Templates\ProjectTemplates\Visual C#” for Vista.
- Once open, create a new directory (called Silverlight).
- When you click Extract on the tool, it will ask you for a location. Select the new Silverlight directory you just created.
- Open this new Silverlight directory and you’ll see that its extracted the file into a deep set of directories. Dive down into these directories and at the end will be the SilverlightJSApplication.zip file. Cut and paste it back in the Silverlight directory you created and remove the extra directories. NOTE: The file you’re placing in the template directory is a ZIP file…that is fine! Don’t extract it otherwise Visual Studio will never see it.
- Lastly, from a command-line run Visual Studio with a setup flag (*YOUR VISUAL STUDIO DIRECTORY\Common7\IDE\devenv.exe /setup) to make sure it scans the template directory.
- It will churn for a minute then go away (without showing the UI). I use Process Explorer (or Task Manager) to wait for it to disappear.
Let me know if you have any improvements on this process.
UPDATE: This works the same on Visual Studio 2008 RTM!