If you get the “Type cannot be found” error after installing your WCF service, go to the section about unloading your project below.

Here are the main steps to creating a WCF service and installing it on a SharePoint 2010 server:

Open Visual Studio 2010
Create an Empty SharePoint 2010 project to get the packaging files
Change your namespace in the Project Properties.
Add a new Item, WCF Service with a new file name
Add the following lines above the class declaration that implements the “IService” file:


[AspNetCompatibilityRequirementsAttribute(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]

PricingRequestService : IPricingRequestService


Add the following references to your project:

C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14ISAPIMicrosoft.SharePoint.dll

Add a mapped folder to the “_Layouts” folder
Inside the _Layouts folder create a text file with a .svc extension such as PricingRequestService.svc

Add the following sample: <%@ServiceHost
Language=”C#” Debug=”true”

Service=”PricingRequest.PricingRequestService, $SharePoint.Project.AssemblyFullName$”

Factory=”Microsoft.SharePoint.Client.Services.MultipleBaseAddressBasicHttpBindingServiceHostFactory, Microsoft.SharePoint.Client.ServerRuntime, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c”

Change the namespace and service name to your own. Leave [...]