调试 Silverlight RIA DomainService 到 DomainContext 代码生成

发布于 2024-10-30 14:36:43 字数 503 浏览 4 评论 0原文

我在 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 技术交流群。

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

发布评论

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

评论(2

仅此而已 2024-11-06 14:36:43

在 Visual Studio 2010 中构建时,如果将“MSBuild 项目构建输出详细程度”设置为“诊断:IIRC”,您应该会看到大量详细输出

Tools > Options... > Projects and Solutions > Build and Run
    MSBuild project build output verbosity: Diagnostic

,您会看到 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:

Tools > Options... > Projects and Solutions > Build and Run
    MSBuild project build output verbosity: Diagnostic

IIRC you see what the RIA tooling does output but it does not tell you what it skips nor why.

浮生面具三千个 2024-11-06 14:36:43

检查这个,它处理存储过程和复杂类型,但它会让您了解如何退回定制 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.

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