Designer cs not updating

Sometimes when I'm editing page or control the .designer files stop being updated with the new controls I'm putting on the page.

I'm not sure what's causing this to happen, but I'm wondering if there's any way of forcing Visual Studio to regenerate the .designer file.

If you simply want to create it, create a new empty file with the same name, after saving your aspx or ascx file again, the designer class will be created for you.

I'm using Visual Studio 2008 EDIT: Sorry I should have noted I've already tried: It's it ridiculous that in 2012 Visual Studio still doesn't have a context menu item to regenerate designer files from source files?

It's akin to not being able to rebuild a corrupt DLL. Especially with external source control and external editors you leave Visual Studio crippled. I'm actually trying to regenerate resource file designers.

I have met this problem when I add a usercontrol in aspx file.

So I change source view to design view and switch back and forth, even I reopen my solution and rebuild, it still cannot be found.


Leave a Reply