组件'XYZ没有由URI标识的资源... [英] The component 'XYZ does not have a resource identified by the URI...

查看:82
本文介绍了组件'XYZ没有由URI标识的资源...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

前一段时间,我编写了一个使用插件的应用程序.它基于WinForms,但我最近对其进行了重新设计以使用WPF.它的功能之一是能够将插件拖放到文件夹中并使其启动(如果未启动则启动任何依赖项).

A while ago I wrote an application which used plug-ins. It was based on WinForms but I recently reworked it to use WPF. One of the features it has is the ability to drop plugins into the folder and have them startup (and starts any dependencies if they're not started).

现在,如果我在启动主应用程序时目录中已经有插件,则一切正常.

Now, If I have the plugins already in the directory when I startup the main application everything runs okay.

如果我加载没有插件的主应用程序,然后稍后再添加插件,则会收到以下错误消息:组件'XYZ'没有由URI'/ThePluginAssembly;component/MyUsercontrol.xaml标识的资源. "在UserControls构造函数的InitializeComponent()方法上.

If I load the main application without a plugin and then add the plugin sometime later I receive the following error: "The component 'XYZ' does not have a resource identified by the URI '/ThePluginAssembly;component/MyUsercontrol.xaml'" on the InitializeComponent() method in the UserControls constructor.

关键点是:

1.用户控件位于插件程序集中

1. The user control is located in the plugin assembly

2.我正在尝试从插件程序集内部创建用户控件

2. I am trying to create the usercontrol from inside the plugin assembly

3.插件与主应用程序位于同一目录

3. The plugins are located in the same directory as the main application

4.仅当通过XAML创建用户控件时,它们才会出现问题.我在同一程序集中有几个其他用户控件,但我使用代码实例化了这些控件.当我尝试在XAML中创建UserControl时,只会收到错误消息.

4. The user controls only have problems when they are created through XAML. I have a couple of other usercontrols in the same assembly but I instantiate these using code. I only receive the error message when I attempt to create a UserControl in XAML.

5.我已阅读

5. I have read http://pavanpodila.spaces.live.com/blog/cns!9C9E888164859398!193.entry but the tips do not solve my problem.

有人能指出我正确的方向来解决这个问题吗?

Can anyone point me in the right direction to solving this?

谢谢

推荐答案

您好,

我也遇到了同样的问题.您有在这里分享的解决方案吗?

谢谢,
罗伊
Hi,

I am very much having the same problem. Do you have a solution to share here?

Thanks,
Roy


这篇关于组件'XYZ没有由URI标识的资源...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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