Add Silverlight Web Parts to SharePoint Using New Visual Studio Extension
Last week at DevConnections in Orlando we announced the availability of the Silverlight SharePoint Web Parts Visual Studio Extension project that makes it easy for you to create Silverlight Web Parts for SharePoint 2010. This has been a project that I have been working on for a while and I am pleased how the first release turned out. The extension enables you to create a Silverlight Web Part project that uses the built in Silverlight Web Part that ships with SharePoint. This is a super quick and easy way to package you Silverlight application into a SharePoint wsp solution package that can be deployed to a sandboxed solution. But the extension also enables to you create a custom Silverlight Web Part based on a sandboxed Visual Web Part that ships with the Visual Studio 2010 SharePoint Power Tools.
Download: Silverlight SharePoint Web Parts
Watch the video on Silverlight TV to see how the extension works.
Download the extension from the link above. The extension is packages as a .vsix file. Double click on the .vsix extension to install into Visual Studio.
(Note: Be sure to install the Visual Studio 2010 SharePoint Power Tools first)
You will need to create 2 projects, a SharePoint 2010 project and a Silverlight project.
- Create a new Visual Studio Solution and add an Empty SharePoint project
- Add a Silverlight project to the solution
- Add a Silverlight Web Part project item to the SharePoint project
Adding the Silverlight Web Part does a number of things for you.
- Adds a module to deploy the Silverlight .xap file.
- Adds a Silverlight Web Part with all the properties set to point to the .xap.
- Adds a test harness wiki page in the SitePages library so that you can F5 and run the app.
Press F5 to run the project. Since a test harness page was created when you added the Silverlight Web Part you can just browse to the Site Pages library
I would like to give a special thanks to Scott Hillier who helped me develop this extension.