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. 

Then you can run Visual Studio 2008 and under "Visual C#" is a Silverlight directory with the new template: "Silverlight JavaScript Application":

Let me know if you have any improvements on this process.

UPDATE: This works the same on Visual Studio 2008 RTM!

Comments:

Thanks...saved me what I'm sure would have taken half the night.

Perhaps I spoke to soon (not that I didn't appreciate your post). Check my post here:
http://silverlight.net/forums/p/4561/13563.aspx#13563

Any tips on how to get intellisense aswell...? :|

Here's directions to get Intellisense in VS 2008:
http://adoguy.com/2007/11/16/Getting_Intellisense_for_Silverlight_in_VS_2008.aspx

Please send me more materials about how to use silverlight?
I am a fresh man on it!
But I really like it!

Thank you very much!!!!!!

Thank you! I was so frusturated that I had to use VS2005 w/o JScript debugging for Silverlight1.0 templates.

Actually, script debugging works fine in 2005...if you need help with that, leave another comment.

Why does it ask me to install Crystal Reports for VB when creating a new Silverlight JS project in RTM?

Weird, I have no idea. I usually choose to not install Crystal Reports when I install VS so perhaps that's why I never got this.

thanks for your great article

I went through this (with the RTM) and got the "Silverlight Javascript Application" installed and working. However, I noticed in VS2008 under File | New Web Site, there is a "Silverlight Script Web" template that creates a Silverlight 1.0 project that is different from the project created by "Silverlight Javascript Application". So, which one of these templates should I use to create Silverlight 1.0 projects? (They produce different files).

I've explained the difference here:
http://adoguy.com/2007/12/10/Visual_Studio_2008_Silverlight_Web_Site_Template.aspx

Thanks for the quick tutorial but after following the instructions very carefully it did not seem to work for me.. Any ideas?

try running "devenv.exe /setup" as an admin and see if that fixes it. Make sure what you dropped in the directory is the .zip file not its contents.

Thanks a lot for this post. 'Twas a huge help!!

thx man that was just gr8

i have installed vs 2008 but i could not see the silverlight project. could anyone point me out about this?

Peter,

Visual Studio doesn't have Silverlight by default. Go to http://silverlight.net/getstarted and download the Silverlight Tools for Visual Studio.


 



 
Save Cancel