.NET 3.5 SP1 的数据服务更新破坏了客户端,关于回滚有什么想法吗?

发布于 2024-08-15 07:28:54 字数 691 浏览 2 评论 0原文

好吧...严重的问题。

我做了更新,认为我可以继续使用 CTP2 版本的 Microsoft.Data.Services.Client 库进行连接,直到他们更新 Silverlight 位。不去。好吧,我可以忍受。

我将服务回滚到重新编译的 CTP2 库( Microsoft.Data.Services + Microsoft.Data.Services.Client ),然后在 silverlight 中更新了服务引用。

此时,服务和 SL3 客户端都使用 CTP2 位。应该没问题吧?错误的。非常非常错误。

System.Data.Services.Client.DataServiceCollection' 不包含采用 '2' 个参数的构造函数

这是一个严重的问题,并且没有提到此更新会破坏 CTP2 功能。老实说,关于 SL dll 的警告还不够:)

关于如何解决这个问题有什么想法吗?我应该尝试卸载更新还是可以在配置文件中的某个位置指定较旧的库?

帮助! :)

Ok... serious problem.

I did the update, thinking that I could continue to use the CTP2 version of Microsoft.Data.Services.Client the library to connect till they updated the Silverlight bits. No go. Ok, I can live with that.

I rolled back the service to the CTP2 libraries ( Microsoft.Data.Services + Microsoft.Data.Services.Client ) recompiled and then updated the service reference in silverlight.

At this point, the service AND the SL3 client are all using the CTP2 bits. Should be fine right? Wrong. Very, very wrong.

System.Data.Services.Client.DataServiceCollection' does not contain a constructor that takes '2' arguments

This is a serious show stopper, and it was not mentioned that this update would break CTP2 functionality. The warning about the SL dll was not, honestly, enough :)

Any ideas on how to resolve this? Should I try and uninstall the update or can I specify an older library in in a config file someplace?

Help! :)

Ken

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

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

发布评论

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

评论(1

无人问我粥可暖 2024-08-22 07:28:54

首先,问题是您的一个项目选择了错误的程序集,它可能是服务,但最有可能是客户端应用程序。

CTP 2 v1.5 中 DataServiceCollection 的可用构造函数有:

private DataServiceCollection();
internal DataServiceCollection(IEnumerable<T> items);
protected DataServiceCollection(DataServiceContext context, string entitySetName, IEnumerable<T> items, Func<EntityChangedParams, bool> entityChangedCallback, Func<EntityCollectionChangedParams, bool> collectionChangedCallback);
internal DataServiceCollection(DataServiceContext context, string entitySetName, Func<EntityChangedParams, bool> entityChangedCallback, Func<EntityCollectionChangedParams, bool> collectionChangedCallback, IEnumerable<T> items);

RTM 版本(您安装的更新)KB976126 中可用的构造函数有:

public DataServiceCollection();
public DataServiceCollection(IEnumerable<T> items);
public DataServiceCollection(DataServiceContext context);
public DataServiceCollection(IEnumerable<T> items, TrackingMode trackingMode);
public DataServiceCollection(DataServiceContext context, string entitySetName, Func<EntityChangedParams, bool> entityChangedCallback, Func<EntityCollectionChangedParams, bool> collectionChangedCallback);
public DataServiceCollection(IEnumerable<T> items, TrackingMode trackingMode, string entitySetName, Func<EntityChangedParams, bool> entityChangedCallback, Func<EntityCollectionChangedParams, bool> collectionChangedCallback);
public DataServiceCollection(DataServiceContext context, IEnumerable<T> items, TrackingMode trackingMode, string entitySetName, Func<EntityChangedParams, bool> entityChangedCallback, Func<EntityCollectionChangedParams, bool> collectionChangedCallback);
internal DataServiceCollection(object atomMaterializer, DataServiceContext context, IEnumerable<T> items, TrackingMode trackingMode, string entitySetName, Func<EntityChangedParams, bool> entityChangedCallback, Func<EntityCollectionChangedParams, bool> collectionChangedCallback);

我建议如果您想使用 CTP dll,请检查客户端上的引用应用程序以及使用 System.Data.Services.Client.dll 并更改为 Microsoft.Data.Services.Client.dll 的任何其他应用程序(位于 ADO.NET Data Services V1.5 CTP2 文件夹中的程序文​​件中) 。

我也安装了最新版本,并且目前正在我的电脑上运行这两个版本。

另一件重要的事情是检查全局程序集缓存,因为两个版本都将安装在那里(CTP 2 ddls 的版本号为 99.0.0.0)。

我所做的事情是,对于 CTP dll,我添加了 ctp 文件夹中的引用,而不是全局程序集缓存。

问候

Daniel Portella

更新:Soulhuntre 它必须是 Web 服务引用正在使用的 EntityClassGenerator,服务引用必须使用 GAC system.data.services.client dll 来生成类而不是旧的类CTP 的。
您实际上可以做两件事,一是执行我上面所说的操作,二是删除更新的内容(卸载 KB),这应该恢复所做的更改。您甚至可以尝试删除旧的服务引用并重新创建它,同时确保它使用 CTP dll 来生成类。

它适用于我的解决方案,因为我编写了自己的 DataServiceClientGenerator 实现,可以完成 MS 提供的解决方案无法完成的神奇任务,这一定是我可以毫无问题地运行这两个安装的原因。

更新结束。

Firstly the problem is that one of your project is picking up the wrong assembly it may be the service but most probably it is the client application.

The available constructors in the CTP 2 v1.5 for the DataServiceCollection are:

private DataServiceCollection();
internal DataServiceCollection(IEnumerable<T> items);
protected DataServiceCollection(DataServiceContext context, string entitySetName, IEnumerable<T> items, Func<EntityChangedParams, bool> entityChangedCallback, Func<EntityCollectionChangedParams, bool> collectionChangedCallback);
internal DataServiceCollection(DataServiceContext context, string entitySetName, Func<EntityChangedParams, bool> entityChangedCallback, Func<EntityCollectionChangedParams, bool> collectionChangedCallback, IEnumerable<T> items);

The Constructors available in the RTM release (the update you installed) KB976126 are:

public DataServiceCollection();
public DataServiceCollection(IEnumerable<T> items);
public DataServiceCollection(DataServiceContext context);
public DataServiceCollection(IEnumerable<T> items, TrackingMode trackingMode);
public DataServiceCollection(DataServiceContext context, string entitySetName, Func<EntityChangedParams, bool> entityChangedCallback, Func<EntityCollectionChangedParams, bool> collectionChangedCallback);
public DataServiceCollection(IEnumerable<T> items, TrackingMode trackingMode, string entitySetName, Func<EntityChangedParams, bool> entityChangedCallback, Func<EntityCollectionChangedParams, bool> collectionChangedCallback);
public DataServiceCollection(DataServiceContext context, IEnumerable<T> items, TrackingMode trackingMode, string entitySetName, Func<EntityChangedParams, bool> entityChangedCallback, Func<EntityCollectionChangedParams, bool> collectionChangedCallback);
internal DataServiceCollection(object atomMaterializer, DataServiceContext context, IEnumerable<T> items, TrackingMode trackingMode, string entitySetName, Func<EntityChangedParams, bool> entityChangedCallback, Func<EntityCollectionChangedParams, bool> collectionChangedCallback);

I suggest if you want to use the CTP dlls, that you check your references on your client application and any other application that makes use of the System.Data.Services.Client.dll and change to Microsoft.Data.Services.Client.dll (located in program files in the the ADO.NET Data Services V1.5 CTP2 folder).

I have installed the latest version also and am am currently running both versions on my PC which it is working.

Another important thing is to check the global assembly cache since both versions will be installed there (with the CTP 2 ddls having an version number of 99.0.0.0).

Something I have done is for the CTP dlls I added the references from the ctp folder instead of the global assembly cache.

Regards

Daniel Portella

Update: Soulhuntre it must be the EntityClassGenerator that the web service reference is using, the service reference must be using the GAC system.data.services.client dll to generate the classes instead of the old CTP ones.
There is two things you can do really one is to do what I said above and the other is to remove the updated (uninstall the KB) that should revert the changes done. You could even try removing the old service reference and creating it again while making sure it uses the CTP dlls to generate the classes.

It works on my solution because I have written my own implementation of the DataServiceClientGenerator, to do magical things that the one shipped by MS doesnt do that must be why i can run both installations with out problems.

End of Update.

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