Jeff B
Jeff B

Reputation: 545

Visual Studio convert web application to website

I know this is going backwards - but I would like to convert a web application back into a website. I want to do this because there are/will be many people working on it and we like to be able to update just a single page without having to compile/deploy the entire project.

My environment is Visual Studio 2012/ASP.Net 3.5/c#

Upvotes: 3

Views: 6252

Answers (1)

Marius George
Marius George

Reputation: 526

The following worked for me:

  1. Delete the .sln, .suo, .csproj, .csproj.user, *.debug.config, *.release.config and any other project/solution related files.
  2. In Visual Studio, choose File -> Open -> Website and browse to the project folder. The folder you want is typically the one where the global.asax and default.aspx pages are in (root).
  3. Open it up.
  4. Click on the newly generated Solution at the root of your Solution explorer.
  5. Choose File -> "Save xxxxxx.sln As..." and save the new *.sln somewhere.
  6. Rename your App_Start folder to App_Code.

These steps are just based on a quick experiment I did with a basic new WebForms web application project.

Depending on the complexity or type of your project, you may need additional steps.

In essence, you are just trying to strip away the "project" files and recreating a Solution file.

Upvotes: 4

Related Questions