Tuesday, November 3, 2009

Forcing the ASP.NET Web Application Designer class to update

Every now and then a designer class will not update to reflect that changes occurring in the markup (aspx/ascx). The first sign is typically the loss of IntelliSense for controls you know are on the page/control followed by "The name 'your control here' does not exist in the current context" compile errors if you progress as far as a build.

Cutting and pasting markup seems to be a fairly reliable way of breaking the designer classes.

My current preferred solution is to delete the offending designer class and then use the "Convert To Web Application" option that becomes available in solution explorer. Note that this option isn't available until you remove the out of date designer file.

Useful links: