How to change a Visual Studio 2005 class project to a web project

I tend to create new Visual Studio projects using the class library template, then make it into what I want. Sometimes, what I want is a web project. Through the project properties view, you can change a project between a class library, windows application, or console application with ease — but there’s no easy way to change to a web project.

Fortunately, there is an easy way to do it.

Open your VS2005 project file (ending in .csproj) in a text editor. Add a new line (shown below) to the first , usually one of the first few lines in the file.

<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>

Save the file and reopen your project. Viola! It’s a web project. But there is a bit more to do. Find each <OutputPath> line, and set remove the Debug or Release (or any other) folder, so it just reads as follows.

&lt;OutputPath&gt;bin\&lt;/OutputPath&gt;

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.