秋忆博客
若是有缘,时间空间都不是距离,若是无缘,终日相聚也无法会意,凡事不必太在意,更不需去强求。

  今天遇到很奇怪的现象,我的Visual Studio 2008突然无法识别ASP.NET中的“asp”标签前缀,开始以为是Visual Studio出问题了,重启系统后还是没有解决,然后在“添加和删除程序”中修复了一遍Visual Studio,问题还是没有解决。上Google一搜索,有结果,在一个MSDN的博客中看到:

I blogged earlier that in VS 2005 we switched from using static XML schemas to automatically generating them using reflection on Web controls. XML schemas are generated on demand as you open pages in your Web site. They contain information about ASP.NET controls, custom and user controls. You can find generated files cache in

C:\Documents and Settings\[Username]\Application Data\Microsoft\VisualStudio\8.0\ReflectedSchemas

So, the first thing you want to do if you see dreaded "'asp' is an unrecognized tag prefix or device filter" error is to close all VS instances and then delete the folder contents. Restart VS, open your Web site and we will generate schemas again.

  然后我就把C:\Documents and Settings\[Username]\Application Data\Microsoft\VisualStudio\9.0删掉(没事,VS会重建的),再启动VS打开项目,一切正常了。

  为什么会出现此情况呢?那是因为我重新换了一个Windows用户,然后把旧用户里的Application Data复制过来了,VS可能就不能识别ReflectedSchemas下面的内容,所以全部“asp”标签前缀都无法识别了。

posted on 2008-10-15 22:37  秋忆  阅读(5162)  评论(0编辑  收藏  举报