Enabling Web Editor Support in Class Library Projects

One of the things that has bothered me for a while is that it’s tough to edit web files (.aspx / .ascx files) in non-web projects.  I think you can edit them if they are in the root directory (I may be recalling wrong, it’s been a while) but the minute you put them in a directory the editor won’t open up for them.  Jeff Burt informed me this morning that if this bothers you, you can fix it!  Just open up your project file, locate the line containing the <ProjectGuid> element and add the following line under it:

<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

This enables web editing functionality in non-web projects.  If your project already has a ProjectTypeGuids element then you may just have to add those entries to the existing list.  Thanks Jeff!