I've been banging my head on this one. I've never used the auto-generated designer files in Visual Studio before (it's the OCD...), but I'm trying to use them now and I don't know if this is a known problem or if I'm just SOL.
In my SharePoint project in Visual Studio 2010, the auto-generated code-behind *.aspx.designer.cs
files are not generating any code for Application Pages in the project. It works as expected for user controls in the SharePoint project, and for standard .aspx
pages in a non-SharePoint project on the same box. However, if you add a new page to a SharePoint project, like: Add > New Item... > Application Page
(under Installed Templates > Visual C# > SharePoint > 2010
on the left), the designer files don't work.
I've tried a number of methods I've found online, chiefly:
- Change the .aspx file and save
- Cut the entire .aspx file, save, paste it all back, save
- Deleted and recreated the designer file
- Deleted and recreated the entire page
None of these have worked for me.
Additionally:
- This is not permissions related (account is an administrator and UAC is disabled on this box, VS is running as admin)
- There are no extensions installed in this case, so that's out
- Design view is not an option for the Application Page template, so you can't toggle it
- In SharePoint projects there is no option for "Convert to Web Application"
From:
How do you force Visual Studio to regenerate the .designer files for aspx/ascx files?
Visual studio 2010 not generating new control definitions in designer file
Visual Studio 2010 Designer File Not Updating
This seems to me to be related to the Application Page template, as the Designer works fine for user controls in the same project, and the Application Page template doesn't allow Design View. Does anyone know how to resolve this?