locked
Adding Service Reference in VS 2008 to 2010 WCF Data Service RRS feed

  • Question

  • Hello,

    I'm having a problem in where I cannot add a service reference in Visual Studio 2008 to a WCF Data Service created in Visual Studio 2010. I get the following error:

    DS_InvalidMetadataFile
    Parameter name: edmxDocument

    Doing my own investigation it appears that the add service reference method does not like the http://schemas.microsoft.com/ado/2008/09/edm namespace that a VS 2010 WCF Data Service uses.  It appears to look for http://schemas.microsoft.com/ado/2006/04/edm.

    I've tried used the DataSvcUtil.exe that comes with VS2008 and that appears to create the necessary code file although I haven't tested it. Anybody have any suggestions on what could be done to get a VS 2010 WCF Data Service to work with VS 2008 Add Service Reference?

    Monday, November 15, 2010 6:10 PM

Answers

  • Then I suppose the update wasn't applied the add service references (visual studio). We have stopped maintaining the VS2008 branch unless it's security or critical updates. Can you get around this by using the codegen utility or upgrade to VS2010?

     

    Regards,

    PQ


    Peter Q. http://blogs.msdn.com/peter_qian
    • Marked as answer by William Klein2 Thursday, November 18, 2010 2:38 PM
    Thursday, November 18, 2010 12:41 AM
    Answerer

All replies

  • Have you tried applying the V2 update to 3.5 SP1 yet? 

    http://blogs.msdn.com/b/astoriateam/archive/2010/01/27/data-services-update-for-net-3-5-sp1-available-for-download.aspx

     

    Regards,

    PQ


    Peter Q. http://blogs.msdn.com/peter_qian
    Monday, November 15, 2010 7:01 PM
    Answerer
  • I had tried the January 27 version for Windows XP of that update last week before I knew the exact problem, but it didn't solve it.

    According to the KB articles for the update it only updates the .NET framework but not VS 2008. I did notice however from the link you provided that the CTP 2 release included updates for VS 2008. 

    Monday, November 15, 2010 8:26 PM
  • Have you got FK in the EF model? I don't exactly remember the EDM namespace we supported in V3.5, does DataSvcUtil output the correct code?

    Regards,

    PQ


    Peter Q. http://blogs.msdn.com/peter_qian
    Tuesday, November 16, 2010 1:42 AM
    Answerer
  • With the update applied DataSvcUtil does produce the right code. 
    Tuesday, November 16, 2010 2:32 PM
  • Then I suppose the update wasn't applied the add service references (visual studio). We have stopped maintaining the VS2008 branch unless it's security or critical updates. Can you get around this by using the codegen utility or upgrade to VS2010?

     

    Regards,

    PQ


    Peter Q. http://blogs.msdn.com/peter_qian
    • Marked as answer by William Klein2 Thursday, November 18, 2010 2:38 PM
    Thursday, November 18, 2010 12:41 AM
    Answerer
  • Well I guess it sounds like there is no other work around.  I am using the DataSvcUtil right now so I guess i'll have to continue to use that. 

    Thursday, November 18, 2010 2:40 PM