如何获取有关Silverlight代码生成异常的详细信息? [英] How can I get details about a Silverlight code generation exception?

查看:103
本文介绍了如何获取有关Silverlight代码生成异常的详细信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

构建Silverlight业务应用程序时出现以下错误:

I'm getting the following error now when I build my Silverlight Business Application:

代码生成器

'Microsoft.ServiceModel.DomainServices.Tools.CSharpCodeDomClientCodeGenerator'
遇到致命异常,
无法为项目生成代码

'Microsoft.ServiceModel.DomainServices.Tools.CSharpCodeDomClientCodeGenerator' encountered a fatal exception and could not generate code for project

'C:\软件\ProjectPartCenterAdmin\Alpha\最新的
版本\ProjectPartCenterAdmin\ProjectPartCenterAdmin.csproj':

'C:\Software\ProjectPartCenterAdmin\Alpha\Latest Version\ProjectPartCenterAdmin\ProjectPartCenterAdmin.csproj':

例外已被调用的
目标抛出。

Exception has been thrown by the target of an invocation.

自上次工作以来,我对我的代码绝对没有任何关注!我所做的只是对应用程序的干净重建。有没有办法了解异常的详细信息?

I DID ABSOLUTELY NOTHING TO MY CODE since it last worked! All I did was a clean rebuild of the application. Is there a way to get the details on what the exception was? I am dead in the water until i can figure this out.

哦,顺便说一句,我讨厌代码生成!我在RIA服务方面遇到了无尽的问题,我正在尽最大努力以正确的方式做事;

Oh, and by the way, I hate code generation! I've had endless problems with RIA Services and I'm trying my best to do things "the right way"; that is, no hacks.

编辑:

我也曾经收到类似的警告:

I've also been getting a similar warning:


发生以下异常
创建了MEF组合
容器:

The following exception occurred creating the MEF composition container:

无法加载一个或多个请求类型的
。检索
LoaderExceptions属性以获取更多
信息。

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

将使用默认代码
生成器。

The default code generator will be used.

我已经花了一段时间了,却忽略了它,因为该应用程序似乎运行正常。

I've been getting this for some time now, and have ignored it because the application seems to be working fine.

此外,当我删除 CustomValidation 属性可以消除该异常。但是警告没有。

Also, when I remove my CustomValidation attributes the exception goes away. But the warnings do not.

推荐答案

首先,您需要检查项目中是否存在自定义验证错误。我遇到了同样的问题,但是当我意识到我有两个同名的验证结果方法时!并进行更改,构建成功。

First, you need to check if there were custom validation errors in the project. I had the same issue but when I realized that I had two validation result methods with the same name! and change it, the built was successfull.

这篇关于如何获取有关Silverlight代码生成异常的详细信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆