08 April 2011

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!

Keep up to date with Simple-Talk

For more articles like this delivered fortnightly, sign up to the Simple-Talk newsletter

This post has been viewed 1160 times – thanks for reading.

  • Rate
    [Total: 0    Average: 0/5]
  • Share

Damon Armstrong

Damon Armstrong is a Senior Engineering Team Lead with GimmalSoft in Dallas, Texas, and author of Pro ASP.NET 2.0 Website Programming. He specializes in Microsoft technologies with a focus on SharePoint and ASP.NET. When not staying up all night coding, he can be found playing disc golf, softball, working on something for Carrollton Young Life, or recovering from staying up all night coding.

View all articles by Damon Armstrong