Andrew Connell [MVP SharePoint]
1741 Posts |  46 Articles |  5310 Comments
.NET  |  MCMS  |  SharePoint  |  Office System
Andrew Connell's RSS Feed    
AC's Blog Quick Links
SharePoint Quick Links
Article Categories
Archives
May, 2012 (3)
April, 2012 (4)
March, 2012 (4)
February, 2012 (4)
January, 2012 (12)
December, 2011 (6)
November, 2011 (3)
October, 2011 (17)
September, 2011 (8)
August, 2011 (6)
July, 2011 (7)
June, 2011 (13)
May, 2011 (9)
April, 2011 (15)
March, 2011 (1)
February, 2011 (6)
January, 2011 (5)
December, 2010 (11)
November, 2010 (6)
October, 2010 (12)
September, 2010 (5)
August, 2010 (4)
July, 2010 (5)
June, 2010 (6)
May, 2010 (11)
April, 2010 (11)
March, 2010 (9)
February, 2010 (9)
January, 2010 (3)
December, 2009 (10)
November, 2009 (15)
October, 2009 (15)
September, 2009 (7)
August, 2009 (4)
July, 2009 (10)
June, 2009 (8)
May, 2009 (2)
April, 2009 (9)
March, 2009 (6)
February, 2009 (16)
January, 2009 (6)
December, 2008 (12)
November, 2008 (12)
October, 2008 (27)
September, 2008 (13)
August, 2008 (14)
July, 2008 (14)
June, 2008 (12)
May, 2008 (23)
April, 2008 (12)
March, 2008 (15)
February, 2008 (13)
January, 2008 (12)
December, 2007 (10)
November, 2007 (8)
October, 2007 (15)
September, 2007 (20)
August, 2007 (21)
July, 2007 (16)
June, 2007 (8)
May, 2007 (25)
April, 2007 (16)
March, 2007 (18)
February, 2007 (18)
January, 2007 (12)
December, 2006 (16)
November, 2006 (13)
October, 2006 (18)
September, 2006 (22)
August, 2006 (27)
July, 2006 (23)
June, 2006 (23)
May, 2006 (23)
April, 2006 (9)
March, 2006 (17)
February, 2006 (15)
January, 2006 (23)
December, 2005 (31)
November, 2005 (32)
October, 2005 (38)
September, 2005 (53)
August, 2005 (30)
July, 2005 (63)
June, 2005 (30)
May, 2005 (59)
April, 2005 (29)
March, 2005 (74)
February, 2005 (27)
January, 2005 (22)
December, 2004 (32)
November, 2004 (42)
October, 2004 (39)
September, 2004 (20)
August, 2004 (14)
July, 2004 (27)
June, 2004 (40)
May, 2004 (5)
April, 2004 (6)
March, 2004 (16)
February, 2004 (26)
January, 2004 (23)
December, 2003 (7)
November, 2003 (14)
October, 2003 (20)
September, 2003 (4)
Post Categories



Managed Windows Shared Hosting

I’ve been struggling trying to work with the new SharePoint 2010 Silverlight client object model on a new environment I setup. This has SharePoint 2010 Beta 2 and Visual Studio 2010 Beta 2… nothing special, that’s it (along with the dependencies such as SQL Server and everything they require).

To work with the Silverlight client object model you have to add two references to your Silverlight project. These two assemblies (Microsoft.SharePoint.Client.Silverlight.dll & Microsoft.SharePoint.Client.Silverlight.Runtime.dll). These can be found in the [..]\14\TEMPLATES\LAYOUS\ClientBin folder. However I was having an issue.

After opening Visual Studio 2010 Beta 2, I created a Silverlight application that targeted .NET 3.5. When prompted I let the project wizard create an associated ASP.NET Web application to test it. Everything was good… until I tried to add a reference to the two SharePoint Silverlight client object model assemblies. When I added them, they appeared with  little warning icons… which you know is not good. So I jump to the code file MainPage.xaml.cs and try to add some using statements… specifically to Microsoft.SharePoint. Uh oh… it won’t resolve!

What gives?

Well get this: when you create a new project and accept the default path, it goes in something like this: c:\users\[username]\documents\Visual Studio 2010\Projects\[Solution/Project Name]. When I moved the project to a more shallow path such as c:\Demos\[Solution/Project Name] & opened it in Visual Studio 2010 beta 2, it worked just fine!

The skinny: It appears that if you have a deep path, Visual Studio 2010 has trouble referencing some assemblies… for me, that’s the SharePoint 2010 Silverlight client object model. The fix: don’t work with projects nested deep in folders. I’ll file this as a bug and cross my fingers.

posted on Thursday, November 19, 2009 6:39 AM

Feedback

# re: FYI – Interesting Little Bug in VS 2010 Beta 2 when working with the SharePoint 2010 Silverlight Client Object Model 11/19/2009 9:00 AM Jonathan Mast
Gravatar AC: awesome! I had this issue in the tech preview as well. Was driving me crazy!

Thanks for the help.

# re: FYI – Interesting Little Bug in VS 2010 Beta 2 when working with the SharePoint 2010 Silverlight Client Object Model 11/24/2009 12:18 PM Vimal Subramaniam
Gravatar Another little trick is to copy the client OM assemblies, Microsoft.SharePoint.Client.Silverlight.dll & Microsoft.SharePoint.Client.Silverlight.Runtime.dll from 14 hive ("C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ClientBin") locally to your project and everything resolves just fine.

Vimal

# re: FYI – Interesting Little Bug in VS 2010 Beta 2 when working with the SharePoint 2010 Silverlight Client Object Model 11/30/2009 9:40 PM Bil Simser
Gravatar I never develop in the C:\users\blah\blah\blah path. It's crazy. I do all my work in d:\development. A way to get around this problem (other than what AC mentions) is if you're really enamoured with the default path (and you *can* change the default in Visual Studio if you want) is to use a subst command on the folder. Just do this from a command prompt:

subst x: c:\users\[username]\documents\Visual Studio 2010\Projects

Now all your projects can be x:\Project Name.

# re: FYI – Interesting Little Bug in VS 2010 Beta 2 when working with the SharePoint 2010 Silverlight Client Object Model 2/10/2010 11:59 AM Aroh Shukla
Gravatar AC, Thanks a for that trick ...i ran into same issue ..

Thanks!

# re: FYI – Interesting Little Bug in VS 2010 Beta 2 when working with the SharePoint 2010 Silverlight Client Object Model 3/21/2010 9:57 PM Adriana
Gravatar I have another issues related to SL object model with SP 2010. If you look at the following site, example 1 works for me, however, example 2 (where you create a list item) does not work. I get nothing on the page.. no msg boxes and no exceptions.

http://msdn.microsoft.com/en-us/library/ee538971(office.14).aspx

Anyone know another way to add new items to an existing sharepoint list through Silverlight?

# re: FYI – Interesting Little Bug in VS 2010 Beta 2 when working with the SharePoint 2010 Silverlight Client Object Model 3/21/2010 10:41 PM AC [MVP SharePoint]
Gravatar @Adriana - I just posted the demos from my session at the SharePoint 2010 Pro Summit that includes a Silverlight samples... you'll find code in there that adds items: www.andrewconnell.com/.../...-in-las-vegas-nv.aspx

# re: FYI – Interesting Little Bug in VS 2010 Beta 2 when working with the SharePoint 2010 Silverlight Client Object Model 3/23/2010 8:08 PM Mostafa
Gravatar You are the man Andrew :) Thanks a lot.

Post Feedback

Title:
Name:
Email:
(email will not be displayed)
Url:
Comments: 
Please add 4 and 3 and type the answer here:    
All Comments Are Filtered & Moderated
Unfortunately comment spammers are just too effecient and are constantly dirtying up blogs with irrelevant and unwanted comments trying to improve their standing on search engines. All comments on this blog are moderated. I do not censor comments, but I don't approve comments with vulger language or those soliciting products. Most of the time comments are approved within a few hours of being submitted with the only exception when I'm traveling.

Why are you asking for my email address?
The only reason I'm asking for your email address, which isn't required to submit a comment, is to provide a gravatar if you've created an account for yourself and associated your email address with a small image. If you have a gravatar created for the email address you submit, it will appear next to your comment. Otherwise nothing will appear.

What is a gravatar?
A gravatar is a "globally recognized avatar." You can get more information about gravatars, as well as create your own for free, at www.gravatar.com. You can also view my gravatar here.


Copyright © 2003 - 2012 Andrew Connell
Creative Commons License 
This work is licensed under a Creative Commons License

 
SharePoint Training
Looking for SharePoint 2010 training for developers, administrators, power users, information workers, end users & web designers? Look no further! My company, Critical Path Training offers the best SharePoint training around! We offer public & private classes both as in-person instructor-loed hands-on classes and online classes. Check out our schedule and course catalog for all the ways we can get you going on your SharePoint path!