locked
datasvcutil error 7015: parameter switch dataservicecollection is not valid RRS feed

  • Question

  • I am following the http://msdn.microsoft.com/en-us/library/dd756369.aspx "How to: Manually Generate Client Data Service Classes (ADO.NET Data Services)" topic in order to generate binding classes for ADO.NET Data Service to be used as data source for ASP.NET components like asp:GridView. I am using .NET 3.5 SP1.

    The datasvcutil in .NET 3.5 SP1 does not support /dataservicecollection nor /version command line parameters. Therefore it is impossible to generate classes that supports data binding. When datasvcutil from .NET 4 beta is used, then the classes are generated but then they can't be compiled as there is missing EntitySetAttribute within System.Data.Services.Common namespace. According to "http://msdn.microsoft.com/en-us/library/system.data.services.common.aspx" the EntitySetAttribute should be included in .NET 3.5 SP1, but it is not.
    Is it here any workaround to actually generate the binding classes and use the ADO.NET dataservice in ASP.NET components with .NET 3.5 SP1 ?
    Wednesday, November 25, 2009 12:58 PM

Answers

  • Hi Vitku,
    thanks for getting back to me.
    I am using this command to run the DataSvcUtil.exe:

    "%windir%\Microsoft.NET\Framework\v3.5\DataSvcUtil.exe" /dataservicecollection /version:2.0 /language:VB /out:Northwind.vb /uri:http://localhost:12345/Northwind.svc

    The exact version is 3.5.0.0 as it was before I installed the CTP2.
    But your question make me to lookup the hardrive for all DataSvcUtil files and I've found one in "Program Files\ADO.NET Data Services V1.5 CTP2\bin" directory. I somehow expected the CTP2 installation will upgrade my .NET 3.5 SP1 Framework, but it installed itself into separate directory.
    This DataSvcUtil exact version is again 3.5.0.0 but this one supports the /DataServiceCollection and /Version: parameters and generates the bind classes correctly.
    After I've added references to Microsoft.Data.Services.Client.dll and Microsoft.Data.Services.dll provided by CTP2 the project has build successfully.

    Thanks for helping me out.
    • Marked as answer by Loskutak Thursday, November 26, 2009 11:52 AM
    Thursday, November 26, 2009 11:52 AM

All replies

  • Hi,

    You need to have the ADO.NET Data Services v1.5 CTP2 installed for these command line options to work on .NET 3.5 SP1. Take a look here:
    http://blogs.msdn.com/astoriateam/archive/2009/08/31/ado-net-data-services-v1-5-ctp2-now-available-for-download.aspx.
    As to when/how this will ship you can look here: http://blogs.msdn.com/astoriateam/archive/2009/11/25/data-services-release-plan-update.aspx.

    Thanks,
    Vitek Karas [MSFT]
    Wednesday, November 25, 2009 3:17 PM
    Moderator
  • Hi,
    thanks for the links.
    It is still the same even with ADO.NET Data Services v1.5 CTP2 installed, so I'll wait when future releases shows up.
    Wednesday, November 25, 2009 4:12 PM
  • Hi,
    It should work with the CTP2 installed. Can you verify the exact version of the DataSvcUtil.exe file? And the directory from which you're running the file (should be the Framework directory).
    Thanks,
    Vitek Karas [MSFT]
    Thursday, November 26, 2009 9:54 AM
    Moderator
  • Hi Vitku,
    thanks for getting back to me.
    I am using this command to run the DataSvcUtil.exe:

    "%windir%\Microsoft.NET\Framework\v3.5\DataSvcUtil.exe" /dataservicecollection /version:2.0 /language:VB /out:Northwind.vb /uri:http://localhost:12345/Northwind.svc

    The exact version is 3.5.0.0 as it was before I installed the CTP2.
    But your question make me to lookup the hardrive for all DataSvcUtil files and I've found one in "Program Files\ADO.NET Data Services V1.5 CTP2\bin" directory. I somehow expected the CTP2 installation will upgrade my .NET 3.5 SP1 Framework, but it installed itself into separate directory.
    This DataSvcUtil exact version is again 3.5.0.0 but this one supports the /DataServiceCollection and /Version: parameters and generates the bind classes correctly.
    After I've added references to Microsoft.Data.Services.Client.dll and Microsoft.Data.Services.dll provided by CTP2 the project has build successfully.

    Thanks for helping me out.
    • Marked as answer by Loskutak Thursday, November 26, 2009 11:52 AM
    Thursday, November 26, 2009 11:52 AM
  • Hi,

    Sorry I wasn't more specific where to look for the file. The CTP installes side-by-side, not to be disruptive to the system (after all it's just a CTP). That's also why the assemblies are named Microsoft... and not System...
    The version 3.5.0.0 is the same, but if you open properties of the dll (using Windows Explorer) in the details tab there's another version which is kind of like the build number (which should be different for SP1 and CTP2).
    Note that the RTM version will install itself over the 3.5 SP1 and will replace the existing files (assemblies are named System...).

    Thanks,
    Vitek Karas [MSFT]
    Thursday, November 26, 2009 12:22 PM
    Moderator
  • Hi,

    so if it could be of any help or for future reference, the versions of DataSvcUtil are:

    .NET 3.5 SP1: 3.5.30729.1
    ADO.NET 1.5 CTP2: 3.5.30729.4072
    .NET (beta 2) 4.0.21006: 4.0.21006.1

    And thanks for the clarification about the CTP instalation directory, it make sense of course.
    Thursday, November 26, 2009 12:47 PM