There's not going to be a lot of need to do this - go to stock ASP.NET 2.0 projects from Web Application Projects, but I ran into a situation today where I needed to double check some behavioral differences between the two for some Master Page inheritance dependencies.
So, I spent a little time last night going backwards – from a Web Application Project back to a stock project. So for kicks I took my West Wind Web Store project and back ported it out of WAP into stock projects.
Surprisingly this was fairly easy to do:
- Take all code folders and move them into APP_CODE
- Change all CodeBehind= to CodeFile= using “Replace in Files“
- Move the .cs file for global.asax and all .asmx Web Services to APP_CODE -
remove the CodeFile attribute from them
- Fix any pages that are inheriting from other pages by moving the .cs file to APP_CODE
(this may break behavior because ASP.NET will no longer generate the control definitions)
The last step is the most troublesome and time consuming. Figuring out exactly what you need to generate on base classes is a royal pain in stock projects. In my case I had to create the control definitions manually for the base class for two of the classes. NBD though - the base class, base controls were few.
And no I'm not keeping it there although I'm looking to make it work both ways.
Other Posts you might also like