Home > SharePoint 2010, Silverlight > Deploy Silverlight to SharePoint2010

Deploy Silverlight to SharePoint2010

In this post, I’d like to show you how to deploy Silverlight components to SharePoint using Module. You can download the complete source code here.

1. Create empty SharePoint project.

2. Create a Silverlight project in the same solution.

3. Add the following code to the Silverlight project.

4. Create a document library called SLDocLib to store the Silverlight xap file.

5. Add the Module item to deploy the Silverlight xap file to SharePoint.

6. Go to the HelloWorldSL Module property settings, Add Silverlight project to the Project Output References, Set Deployment Type to ElementFile .

7. Deploy the solution and you will see the in the document library called SLDocLib below.

8. Add a Silverlight web part .

9. Type the URL to the xap file in the document library and you will the Silverlight components displayed on the Page.

10. Another way to deploy silver light on the page is to to deploy SharePoint Page using module and in your page using Object tag to link your Silver light xap file.In the link , you can use relative url to link to your silverlight xap file.You can find benefits of using relative url from this SharePointOverflow question here.

Advertisements
  1. kiquenet
    August 14, 2013 at 8:57 pm

    any script Powershell to deploy XAP in List in Sharepoint ?

    • ybbest
      August 14, 2013 at 9:43 pm

      It is should be same of uploading a document using PowerShell. You could find the script below
      #Scripts to import documents to SharePoint document library

      You can download script here.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: