使用 CRM2011 OData 服务参考构建 Silverlight 应用程序时出现 OutOfMemoryException
按照 Microsoft Dynamics CRM SDK CrmODataSilverlight 示例代码提供的说明,我从 CRM2011 解决方案下载了 OrganizationData.csdl,并用它阅读了我的服务参考。 csdl 文件为 4.8mb,并在我的 13.4mb 解决方案中生成了 Reference.cs。
当我尝试构建解决方案时,出现错误,指出“无法打开源文件”...\Reference.cs“(引发了“System.OutOfMemoryException”类型的异常。”)
我已重新启动计算机并尝试重建但是我遇到了同样的问题。
我可以采取什么方法来允许使用此服务引用构建我的 Silverlight 应用程序?我可以从 CRM2011 获取仅包含我感兴趣的实体的 csdl 精简版本吗?或者我可以采取其他方法吗?我不喜欢手动编辑 csdl 文件,因为它使维护成为一场噩梦。
Following the instructions supplied with the Microsoft Dynamics CRM SDK CrmODataSilverlight sample code I have downloaded the OrganizationData.csdl from my CRM2011 solution and readded my service reference with it. The csdl file is 4.8mb and has generated a Reference.cs in my solution of 13.4mb.
When I attempt to build my solution I get an error stating 'Source file '...\Reference.cs' could not be opened ('Exception of type 'System.OutOfMemoryException' was thrown.')
I have restarted my machine and attempted to rebuild however I get the same issue.
What approach can I take to allow my Silverlight application to build with this service reference? Can I get a cut down version of the csdl from CRM2011 containing just the entities I am interested in or is there another approach I can take? I don't fancy having to manually edit the csdl file as it makes maintenance a nightmare.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一篇有关从 crm 2011 生成代理时过滤项目的文章。
可能不完全是您对 silverlight 的需求,但希望能为您指明正确的方向。
http://erikpool.blogspot.com/2011/03/filtering - generated-entities-with.html
至于内存不足,您可以尝试增加Windows中的虚拟内存量。
Here's an article about filtering out items when generating a proxy from crm 2011.
Probably not exactly what you need for silverlight but hopefully points you in the right direction.
http://erikpool.blogspot.com/2011/03/filtering-generated-entities-with.html
As for the out of memory, you can try to increase your virtual memory amount in windows.