Visual Studio convert web application to website

笑着哭i 提交于 2019-12-22 10:08:12

问题


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#


回答1:


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.



来源:https://stackoverflow.com/questions/24146465/visual-studio-convert-web-application-to-website

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!