Element is not a known element warning in Visual Studio when using User controls

后端 未结 7 1686
深忆病人
深忆病人 2021-01-03 21:04

I have a Visual Studio 2008 project that is showing the following warning when using User Controls, and I haven’t been able to find a solution anywhere.

相关标签:
7条回答
  • 2021-01-03 22:10

    This can happen if something's missing in your web.config too. I just ran into this error while copying a custom control from one solution to another, and the page still couldn't find the element. If none of the above fixes the problem, check this section of the web.config and make sure your control is included:

    <controls>
        <add tagPrefix="fu" namespace="Fubar.Base" assembly="Fubar" />
        ...
    </controls>
    

    After adding this, and then closing/reopening the solution, the problem went away.

    0 讨论(0)
提交回复
热议问题