locked
I have just installed the WCF Data services 2011 October CTP RRS feed

  • Question

  • But it does not appear as a project item in VS 2010, and so I can not select it to create a WCF Data Service.

    Thanks


    Burton Roberts
    Sunday, December 25, 2011 11:32 PM

Answers

  • Hi bhroberts52,

    Welcome!

    You're right, please refer the link here: http://blogs.msdn.com/b/adonet/archive/2011/03/21/using-wcf-data-services-with-entity-framework-4-1-and-code-first.aspx

    --------------------------------

    The Microsoft WCF Data Services 2011 CTP2 did not include updated Visual Studio item templates, so I’ll show you how to use the existing item templates and fix them up to use the CTP:

    1. Add a new project item to your HospitalWeb project, choosing “Web” and then “WCF Data Service” in the Visual Studio Add Project Item dialog. I called my service “HospitalService.svc”.

    2. The WCF Data Service that was added to your project refers to .NET 4.0 only, not to CTP2, so we’ll need to make a few changes:

    a. Remove the project references to “System.Data.Services” and “System.Data.Services.Client” from your project.

    b. Add project to references “Microsoft.Data.Services” and “Microsoft.Data.Services.Client” from your project. Note that these assemblies are not installed in the GAC as part of WCF Data Services 2011 CTP2 installation, so you’ll need to browse to the installation directory to find them.

    c. In your “HosptialService.svc.cs” file, change the service version from V2 to V3:

    config.DataServiceBehavior.MaxProtocolVersion =

    DataServiceProtocolVersion.V3;

    --------------------------------

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Monday, December 26, 2011 8:29 AM
    Moderator