OutOfMemoryException when building Silverlight application using CRM2011 OData Service Reference
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.OutOfM开发者_开发知识库emoryException' 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.
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.
精彩评论