Yesterday I was installing a new machine it was a bit confusing as where to get the right Visual Studio project templates for Silverlight version 1.0 and the alpha 1.1 version (now renamed to Silverlight 2.0). I had them working on my hold machine but didn’t actually remember which one I had installed.
So here’s a little overview of the different available tools and templates.
Silverlight 1.0 SDK and project templates
You can get the Silverlight 1.0 SDK including a Visual Studio project template file at this location: http://www.microsoft.com/downloads/details.aspx?FamilyId=FB7900DB-4380-4B0F-BB95-0BAEC714EE17&displaylang=en
The SDK offers the option to install a “Silverligh Javscript Application” project template in Visual Studio.
Unfortunately the Visual Studio project template included with the SDK won’t install on the VS 2008 RTM version, only VS 2005. However, a workaround for installing the project template “Silverlight Javascript Application” with Visual Studio 2008 can be found here:
http://adoguy.com/2007/09/02/Installing_Silverlight_1_0_Templates_on_
Visual_Studio_2008_Beta_2_(Orcas).aspx
Silverlight 1.1 (renamed to 2.0) project templates
Silverlight project templates for Visual Studio can be found in the "Microsoft Silverlight 1.1 Tools Alpha for Visual Studio 2008" download. Templates included with this download are:
- Web site template: Silverlight Script Web. This template can be used to create Silverlight 1.0 Javascript web site.
- Silverlight Project (in Visual Basic or C#): this is the template to
- Silverlight Class Library template: this one can be used to create Silverlight client assemblies.
In addition to the project templates the Tools download also installs intellisense and code generators for XAML, debugging of Silverlight applications, integration with Expression Blend.
Note that you might hit a "…\TestPage.html.js access denied" error if you are using AVG anti-virus as I was. There is a comment on Scott Guthrie’s blog that explains how to fix this.