Saturday, March 07, 2009

unrecognized tag prefix or device filter ‘asp’

 

You have possibly landed on my blog because you got this error when you were trying to compile your project in Visual studio 2005 and are going mad trying to find a solution. So was I :)

You would be getting this error if you had used Master Pages in your project.

That is open your masterpagename.master markup and you would see that under the <head> tag or where ever you had used <asp:contentplaceholder > tags you will notice that the “asp” is underlined in red and the error you get in your Error list is

“Unrecognized tag prefix or device filter ‘asp’”.

The solution is simple, close all the currently open pages in visual studio , how to do that easily would be click on any one open page and right click on the file name example “Default.aspx.cs” and say “Close all but this” and then close the current file too (right click close)

Then search your PageMaster.master and open it in IDE (either design or source view) and try to compile now.

If you have nested master pages try to open all those and compile, it should compile easily without errors.

This may sound stupid but that is how it works !!!!!

No comments: