How To Add Microsoft.SharePoint.Client.ServerRunTime.dll Reference to a WCF Project in Visual Studio 2010?


Scenario

When you create a Windows Communication Foundation (WCF) project in Microsoft Visual Studio 2010, the Microsoft.SharePoint.Client.ServerRunTime.dll assembly is not available on the .NET tab of the Add References dialog box.

Solution

Simply go to the Browse tab and copy paste the following line as the file name and you’re good to go on creating custom WCF:

C:\Windows\assembly\GAC_MSIL\Microsoft.SharePoint.Client.ServerRuntime\14.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.Client.ServerRuntime.dll

Microsoft Solution:

On a more technical explanation, the dll is located in the GAC_MSIL directory:

%Windows%\assembly\GAC_MSIL\

And you are required to manually add the reference to the assembly from there.

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.