Visual Studio 2008中无法识别的标记前缀或设备筛选器 [英] Unrecognized Tag Prefix or Device Filter in Visual Studio 2008

查看:149
本文介绍了Visual Studio 2008中无法识别的标记前缀或设备筛选器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网站引用的程序集中有一组Web控件.我可以毫无问题地构建和运行所有内容,但是当我查看正在使用控件的aspx页面时,在Tag Prefix(标签前缀)下方会显示绿色下划线.

I have a set of web controls that are in an assembly referenced by a website. I can build and run everything without a problem, however when I look at an aspx page where the controls are being used I get a green underline beneath the Tag Prefix.

<%@ Register Assembly="MyProject.UI.ControlLibrary" Namespace="MyProject.UI.ControlLibrary.Web" TagPrefix="ControlLibrary" %>
<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" Runat="Server">
    <ControlLibrary:ListView ID="List" runat="server"/>
</asp:Content>

因此,在此示例中,我在ControlLibrary下获得绿色下划线,当我将鼠标悬停在其上时,它显示无法识别的标记前缀或设备过滤器"ControlLibrary"

So in this example I'd get a green underline under ControlLibrary and when I hover over it it says Unrecognized Tag Prefix or Device Filter 'ControlLibrary'

代码是在Visual Studio的早期版本中编写的,我还有另一个程序集,其中也包含Web控件,并且看起来工作正常.

The code was written in a previous version of Visual Studio, I have another assembly also containing Web controls and that seems to work fine.

关于什么可能导致问题的任何想法?

Any ideas as to what could be causing the problem?

推荐答案

不知道为什么行得通,但确实行得通.当我将其中一个列表视图控件的名称空间从MyProject.UI.ControlLibrary.Web更改为MyProject.UI.ControlLibrary并指向<%寄存器时,它就可以正常工作.

No idea why this works but it does. When I change namespace of one of the listview control to MyProject.UI.ControlLibrary from MyProject.UI.ControlLibrary.Web and repoint the <% register then it works fine.

这篇关于Visual Studio 2008中无法识别的标记前缀或设备筛选器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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