有什么方法可以将 ADO.NET Data Services 1.5 CTP2 与 VS2010 一起使用吗?甚至手动?

发布于 2024-08-16 16:35:56 字数 431 浏览 6 评论 0原文

由于各种原因,我已经干净地安装了我的开发盒,它运行的是 Win7 x64,并且当前安装了 VS2010。我正在维护几个需要使用 .net 3.5 下的 1.5 CTP2 发布服务的项目(显然)。我已经采取了在Win7下安装完整的1.5 CTP2所需的步骤。

虽然我知道通常在 VS2008 中运行的向导式工具不可用(至少,我认为不是?),但我希望暂时可以使用命令行工具来渡过难关,所以我不需要不断地往返于我手边的 VS2008 VM。

我需要做正常的事情...

  • 创建服务和 web.config 条目以启用它

  • 创建或更新服务引用在 Silverlight 项目中

  • 引用 在 WPF 项目中创建或更新

同样,命令行是好的 - 我显然不需要经常这样做。

谢谢!

For various reasons I have clean installed my dev box and it is running Win7 x64 and currently has VS2010 installed. I am maintaining several projects that require the use of the 1.5 CTP2 release services, under .net 3.5 (obviously). I have already taken the steps needed to install the full 1.5 CTP2 under Win7.

While I understand that the wizard style tooling that normally runs in VS2008 is not available (at least, I think it isn't?) I am hoping that temporarily I can get by with using the command line tools to tide me over till then so I don't need to keep round tripping into the VS2008 VM I keep handy.

I need to do the normal things...

  • Create a service and the web.config entries to enable it

  • Create or update a service reference in a Silverlight project

  • Create or update a service reference in a WPF project

Again, command line is OK - I obviously don't need to do this very often.

Thanks!

Ken

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

把梦留给海 2024-08-23 16:35:56

您需要确保 System.Data.Services.Design.dll 已更新并安装在 gac 中(如果您使用的是 Windows 7):

http://wildermuth.com/2009/05/29/Running_ADO_NET_Data_Services_1_5_CTP1_on_Windows_7

另外,当您运行 Visual Studio 时,您需要指定一些环境变量以使其正常工作。我使用批处理文件执行此操作:

set dscodegen_usedsc=1
set dscodegen_version=2.0
call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv"

一旦执行此操作,您可以继续“添加服务引用”并获取 CTP2 代理。

You need to make sure the System.Data.Services.Design.dll are updated and installed in the gac (if you're on Windows 7):

http://wildermuth.com/2009/05/29/Running_ADO_NET_Data_Services_1_5_CTP1_on_Windows_7

Additionally, when you run visual studio, you need to specify some environment variables to make it work. I do this with a batch file:

set dscodegen_usedsc=1
set dscodegen_version=2.0
call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv"

Once you do that, you can continue to to "Add Service Reference" and get the CTP2 proxies.

婴鹅 2024-08-23 16:35:56

Vitek Karas 关于 Microsoft论坛建议了以下内容,但是我留下了可怕的“服务器在处理请求时遇到错误。请参阅服务器日志以获取更多详细信息。”错误。这很糟糕,所以我不知道这是否能正常工作。

嗨,

  • 创建服务和 web.config 条目。将 ADO.NET 数据服务项添加到项目中的向导应该存在。使用那个。完成后,将引用从 System.Data.Services.. 更改为 Microsoft.Data.Services...,并在 .svc 文件中将工厂类型也更改为该程序集(命名空间应保持不变)。如果您需要新功能,可以在 svc.cs 文件中将参数从 InitializeService 更改为 DataServiceConfiguration,但那里生成的接口也应该可以工作。

  • 创建或更新服务参考。真正有趣的部分是为服务生成客户端类。其他的东西只是 VS 项目维护,你实际上不需要构建和运行你的应用程序。同样,您应该能够使用 VS 中的“添加服务引用”来设置项目和引用等(不要忘记将 System.Data.Services.. 更改为 Microsoft.Data.Services...)。预 CTP 代码生成应该与 CTP 二进制文件一起使用,除非您需要使用一些新功能。在这种情况下,请使用名为“datasvcutil.exe”的命令行实用程序。有关详细信息,请参阅此文章:http://msdn.microsoft.com/en-我们/library/dd756369.aspx
    SL 和 WPF 的步骤应该非常相似,生成的代码是相同的,您只需在项目中添加对不同 Microsoft.Data.Service.Client.dll 的引用。

谢谢,

维泰克·卡拉斯 [MSFT]

Vitek Karas over on the Microsoft forums suggested the following, however I am left with the horrible "The server encountered an error processing the request. See server logs for more details." error. Which sucks so I have no idea if this will work right.

Hi,

  • Create service and web.config entries. The wizard to add ADO.NET Data Service item into your project should be there. Use that one. Once that is done change the references from System.Data.Services.. to Microsoft.Data.Services... and in your .svc file change the Factory type to that assembly as well (namespaces should remain the same). In your svc.cs file you can change the parameter to InitializeService to DataServiceConfiguration if you want the new features, but the interface generated there should work as well.

  • Create or update service reference. The really interesting part this does is to generate the client side classes for the service. The other stuff is just VS project maintenance which you don't really need to build and run your application. Again you should be able to use the Add Service Reference in the VS to setup the project and references and such (don't forget to change System.Data.Services.. to Microsoft.Data.Services...). The pre CTP code gen should work with the CTP binaries unless you need to use some of the new features. In that case use the command line utility called "datasvcutil.exe". See this article for details: http://msdn.microsoft.com/en-us/library/dd756369.aspx
    The steps should be very similar for both SL and WPF, the generated code is identical, you just need to add reference to a different Microsoft.Data.Service.Client.dll in your project.

Thanks,

Vitek Karas [MSFT]

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文