“clr-namespace" URI 指的是未包含在程序集中的命名空间 [英] The 'clr-namespace' URI refers to a namespace that is not included in the assembly

查看:44
本文介绍了“clr-namespace" URI 指的是未包含在程序集中的命名空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的 XAML 中包含一些转换值的类.但是,编译时出现以下错误:

I'm trying to include in my XAML some classes which convert values. However, I'm getting the following error when I compile:

未定义的 CLR 命名空间.clr-namespace" URI 指的是未包含在程序集中的命名空间View.Summary.Converters".(ViewView)

Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'View.Summary.Converters' that is not included in the assembly.(ViewView)

它在 XAML 上出错:

And the XAML it's erroring on:

xmlns:c="clr-namespace:View.Summary.Converters"

此外,这里是我的转换类/命名空间的概要:

Also, here is the outline of my conversion classes/namespace:

namespace View.Summary.Converters
{
    class CollapsedIfNegative : IValueConverter { }

    class VisibleIfNegative : IValueConverter { }

    class ErrorCodeToString : IValueConverter { }
}

我不得不删除代码的内容,因为我正在从事的项目是高度机密的.

I had to remove the guts of the code because the project I am working on is highly confidential.

推荐答案

我发现出了什么问题.尽管 Visual Studio 将此显示为第一个错误,但我的编码确实存在其他错误,导致无法组装转换器.因此,当 VS 去寻找程序集时,它不在那里.

I figured out what was wrong. Although visual studio showed this as the first error, there were indeed other errors with my coding which prevented the converters from being assembled. Thus, when VS went to find the assembly, it was not there.

这篇关于“clr-namespace" URI 指的是未包含在程序集中的命名空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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