Rick Strahl's Weblog  

Wind, waves, code and everything in between...
.NET • C# • Markdown • WPF • All Things Web
Contact   •   Articles   •   Products   •   Support   •   Advertise
Sponsored by:
Markdown Monster - The Markdown Editor for Windows

From Web Application Projects to stock ASP.NET 2.0 Projects


:P
On this page:

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.


The Voices of Reason


 

Rick Strahl's WebLog
May 22, 2006

# Web Application Projects and Web Deployment Projects are here

A few weeks back Microsoft released V1 versions of Web Application Projects and Web Deployment Projects, which are a couple of tools that most serious ASP.NET developers need to check out and get familiar with. They address a number of short comings with the stock compilation and deployment models in the shipping version of Visual Studio 2005 and bring back a sense of sanity to these areas of development.

# DotNetSlackers: From Web Application Projects to stock ASP.NET 2.0 Projects


West Wind  © Rick Strahl, West Wind Technologies, 2005 - 2024