MissingManifestException在mscorlib.dll上IMessageService.ShowXXXX [英] MissingManifestException in mscorlib.dll on IMessageService.ShowXXXX

查看:254
本文介绍了MissingManifestException在mscorlib.dll上IMessageService.ShowXXXX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我看来模型中,我有一个IMessageService,这是在构造函数初始化的:

In my view model, I have a IMessageService, which is initialized in the constructor:

private IMessageService messageService;
public MyViewModel()
{
    messageService = ServiceLocator.Default.ResolveType<IMessageService>();
}

及其显示方法的工作原理,但ShowError,ShowInformation和ShowWarning(任何有需要的资源,这里的图标)碰撞与 MissingManifestException 指向 Catel.Properties.Resources.resources 清单。

Its Show method works, but ShowError, ShowInformation and ShowWarning (anything in need of a resource, here the icons) crash with a MissingManifestException pointing towards Catel.Properties.Resources.resources manifest.

在我身边(错误地安装Catel)的错误,或者是它,因为它是那么.NET 4.0版本Catel的?出人意料的是,我还有一个Catel对于.NET 4.0项目,不显示此错误。

Is the error on my side (wrongly installed Catel) or is it because it's the .Net 4.0 version of Catel? Surprisingly, I have another Catel for .Net 4.0 project which doesn't show this error.

编辑:显示,因为当一个 MessageImage ,完美的作品,并没有显示图标

Show, when given a MessageImage, works flawlessly and does show the icon.

编辑2:没关系我最后一次编辑,现在一切都似乎工作......没有任何理由。呼叫显示 MessageImage 会装的资源什么的?这似乎不太可能。

EDIT 2: Nevermind my last edit, everything now seems to work... for no reason. Calling Show with a MessageImage would have "loaded" the resource or something? That seems unlikely.

推荐答案

我找到了来源: CLR异常打破在调试模式下

I found the source: CLR Exception breaking in debug mode.

看起来 Catel 有时会抛出一些处理的异常,然后在您的例外情况的设置,如果你有共同的语言运行时检查(的Visual Studio菜单>调试>异常... 的),你的调试器将打破这些。

It looks like Catel sometimes throw some handled exceptions, and if you have Common Language Runtime checked in your exceptions settings (Visual Studio menu > Debug > Exception...), your debugger will break on these.

这不是那么糟糕,只是打的 F5 继续)打通。

That's not so bad, just hit F5 (Continue) to get through.

令我困惑的是,这个 MissingManifestException 按F5后再次爆发。事实是,它似乎为突破了多个资源图标,看起来像它只是不断打破像一个真正的未处理的异常。

What puzzled me was that this MissingManifestException broke again after hitting F5. The fact is that it seems to break for multiple resource icons, looking like it just keep on breaking like a real unhandled exception.

不过没有关系,所以如果你得到一个Catel例外,不断按F5或禁用CLR例外破

编辑:海尔特的建议,你确实不需要禁用每一个CLR例外断裂。 ..只是禁用MissingManifestException。

as Geert suggest, you indeed don't need to disable every CLR exception breaking... Just disable the MissingManifestException.

这篇关于MissingManifestException在mscorlib.dll上IMessageService.ShowXXXX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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