Visual Studio 2008 2010 突然無法識別ASP.NET中的“asp”標籤前綴

今天遇到很奇怪的現象,我的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”標籤前綴都無法識別了。


本文來自CSDN博客,轉載請標明出處:http://blog.csdn.net/sunshine_me/archive/2010/07/09/5722413.aspx

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章