调试 Silverlight RIA DomainService 到 DomainContext 代码生成
我在 Visual Studio 2010 中使用 Silverlight 4。
我在项目中有一些通过 RIA 引用的域服务。
我特别关心的是域服务,它们返回或在其参数中引用特定于域的(非实体)POCO。
当 Silverlight 客户端项目发生代码生成时,我发现有时会为我的 DomainServices 创建 DomainContext,有时在我的一些代码更改后不会创建它们。同样,支持 POCO 有时会创建,有时不会。
我不知道需要什么规则才能使 DomainContext 代码生成正确且一致地发生。至少,我希望在运行创建 DomainContext 和支持类的代码生成时看到某种控制台输出,以便我可以确定为什么某些代码生成没有创建我期望的内容。
有没有办法调试这个过程,或者获取 Visual Studio 为 POCO 构建 DomainContext 和 Silverlight 端类时发生的操作的日志?至少;是否有一套规则可以帮助我更好地了解幕后发生的事情?
I am using Silverlight 4, in Visual Studio 2010.
I have some Domain Services in a project that are being referenced through RIA.
The ones in particular I am concerned with, are domain services that either return, or reference in their parameters, domain-specific (non-entity) POCOs.
When the Code Generation occurs for the Silverlight Client project, I am finding that sometimes DomainContext(s) for my DomainServices are being created, and sometimes they are not after some of my code changes. Likewise, the supporting POCOs are sometimes created and sometimes not.
I feel lost as to what rules are required to get the DomainContext code generation to occur correctly and consistently. At the very least, I would like to see some sort of console output when the code generation to create the DomainContext and support classes is being run so I can determine why some the code generation is not creating what I expect.
Is there any way to debug this process, or get a log of the actions occurring when Visual Studio builds the DomainContext and Silverlight-side classes for POCOs? At the very least; is there a set of rules that can help me better understand what is going on under the covers?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 Visual Studio 2010 中构建时,如果将“MSBuild 项目构建输出详细程度”设置为“诊断:IIRC”,您应该会看到大量详细输出
,您会看到 RIA 工具的输出内容,但它不会告诉您什么内容它会跳过也不知道为什么。
You should see a lot of detailed output when building in Visual Studio 2010 if you set "MSBuild project build output verbosity" to Diagnostic:
IIRC you see what the RIA tooling does output but it does not tell you what it skips nor why.
检查这个,它处理存储过程和复杂类型,但它会让您了解如何退回定制 poco。
Check this out, it's dealing with sprocs and complex types but it will give you an idea as to what you need to do to return custom poco's.