Geeks With Blogs

News

Hello,
My name is David Jacobus I am a former teacher of Computer Science and Mathematics, who is now working full time as a SharePoint Consultant! I have raced off-road motorcycles for 30+ years! I have fallen in love with Glamis and the Dune experience the last few years! My friends like to say: Jake, with age comes the cage! I suppose that is because at Glamis I use a Razor XP 900! Which has a full roll cage!


David Jacobus SharePoint Consultant

 

I started training on SharePoint 2010 about 3 months ago and I decided that I needed to blog about the ease of developing Silverlight applications with Visual Studio 2010 for SharePoint 2010. In Visual Studio 2008 the methodology would be to:

1. Create a Silverlight application

2. Create the XAP file

3. Move the XAP file into a SharePoint document library or Layouts folder

4. Put a Silverlight Web part on a SharePoint page (not OOTB)

a. Link the Silverlight web part to the XAP file

5. Debug the web part by “Attaching to Process”

6. When the XAP File changed:

a. Copy it back to the document library or Layout folder

Using Visual Studio 2010:

1. Create a SharePoint Blank application

2. Add a Silverlight Web Application

3. Add a module to the SharePoint

a. Add the output of the Silverlight Project to the module

4. Put a Silverlight Web part on a SharePoint page (on my dev. box I set the home page, OOTB)

a. Link the Silverlight web part to the XAP file

5. Hit the F5 key and you are up and debugging

The important distinction here is that you are up and debugging with one keystroke.

I will walk you through the process of setting up a SharePoint 2010/Silverlight project

1. Create a blank SharePoint project in 2010:

1

2. Set it as a SandBoxed solution if applicable

2

3. Add a Silverlight application

3

4. Add a module to the SharePoint application

4

4a

5. Link the output of the Silverlight Project to the SharePoint Module By clicking the module:

5

6. In the properties window click the ellipse’s next to Project Output references

6

7. In the window that appears click add

7

8. In the Properties pane Click Deployment Type and choose Element File

8

9. In the Properties pane Click Project Name and choose the output project to be the Silverlight Web Project (not the application test web site)

9

10. Immediately the module will get the Silverlight XAP file added to it!

10

11. Delete the file reference to the sample.txt file from the module

11

12. Add a URL to the module in this case documents

12

13. Add some content to the Silverlight Project ( I will Add Hello World)

13

13a

14. Configure the web part on the home page/Development site

14

15. Choose the SharePoint Project as the startup project and hit F5. If the web part is on the home page it will come up debugging else browse to the page and “click deploy” on the Build Menu and then refresh the page. Here is the page with Hello World:

15

16. Adding some new text to debug:

16

17. Here is the page being debugged (not using F5) as I don’t have the test web part on the home page. I just attach to process: Using Silverlight as the key to which process to debug:

17

18. Hitting the Breakpoint:

18

19. The new text:

19

Posted on Sunday, August 1, 2010 7:54 PM | Back to top


Comments on this post: Silverlight, Visual Studio 2010 and SharePoint 2010

# re: Silverlight, Visual Studio 2010 and SharePoint 2010
Requesting Gravatar...
I have read the two comments relative to this is hard to read. I post my Blog with live writer, I will see if I can increase image size and text size and repost.
Left by David Jacobus on Jul 20, 2011 1:53 AM

# re: Silverlight, Visual Studio 2010 and SharePoint 2010
Requesting Gravatar...
if you don't enable silverlight debugging in sharepoint project properties (sharepoint tab) it doesn't work.
Left by Dario on Mar 26, 2013 12:19 PM

Your comment:
 (will show your gravatar)


Copyright © David Jacobus | Powered by: GeeksWithBlogs.net