EF 自跟踪 Silverlight WCF

发布于 2024-10-30 01:12:29 字数 313 浏览 3 评论 0原文

你好 我有一个 silverlight4 + .net 4.0 应用程序,我在其中使用自我跟踪实体。 在应用程序中,我有一个 silverlight 项目,其中包含 EF 自跟踪模板生成的实体。 该项目由 wcf 服务和客户端共享,以便更改跟踪工作。 一切都构建得很好,但是当我运行我的服务时出现异常 无法加载文件或程序集“System.Runtime.Serialization,Version=2.0.5.0,Culture=neutral,PublicKeyToken=7cec85d7bea7798e”或其依赖项之一。系统找不到指定的文件。

非常感谢任何帮助,

谢谢 本

Hi
I have a silverlight4 + .net 4.0 application where i am using self tracking entities.
In the application i have a silverlight project which contains the entities generated by EF self tracking template.
This project is being shared by the wcf service and the client so that the change tracking works.
everything builds fine but when i run my service is get the exception
Could not load file or assembly 'System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.

any help is much appretiated

thanks
Ben

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

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

发布评论

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

评论(2

你怎么这么可爱啊 2024-11-06 01:12:29

Silverlight 的正确版本以及 STE 组件的正确版本是:

// Assembly System.Runtime.Serialization, Version 2.0.5.0
Location: C:\Program Files (x86)\Microsoft Silverlight\4.0.60129.0\System.Runtime.Serialization.dll 
Name: System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e 
Type: Library 

如果您引用了 v2.0.50727,则您尚未加载 silverlight 版本,而是加载 .NET 2.0 版本,该版本的签名如下:

// Assembly System.Runtime.Serialization, Version 2.0.0.0
Location: C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Runtime.Serialization.dll 
Name: System.Runtime.Serialization, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Type: Library 

Correct version for Silverlight and probably also for STEs assmebly is:

// Assembly System.Runtime.Serialization, Version 2.0.5.0
Location: C:\Program Files (x86)\Microsoft Silverlight\4.0.60129.0\System.Runtime.Serialization.dll 
Name: System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e 
Type: Library 

If you have referenced v2.0.50727 you haven't loaded silverlight version but .NET 2.0 version which will have signiture like:

// Assembly System.Runtime.Serialization, Version 2.0.0.0
Location: C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Runtime.Serialization.dll 
Name: System.Runtime.Serialization, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Type: Library 
ㄖ落Θ余辉 2024-11-06 01:12:29

必须使用映射到客户端的实体创建一个单独的项目。因此 2 个项目包含相同的实体。一种映射到服务器,一种映射到客户端,每种都使用不同版本的序列化 dll

Had to create a separate project with the entities which was mapped to client side . So 2 projects with contain the same entities. One is mapped to server and one mapped to client and each using different versions of Serialization dll

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