I have a web application project that I wish to keep as a web application project, however is it possible to have part of it compiled on demand like a web site project? I would like one folder where I can add aspx pages to the website after its been published.
views:
28answers:
1Yes. The two can coexist quite well. Just drop your web site pages in and they will dynamically compile. Nothing about web application projects disables this feature or anything. You can also put code in the app_code folder and it will dynamically compile as well.
Managing this in visual studio can present some difficulties. The best bet, if your web site pages aren't dependent on code from the web application project, is to keep these projects completely separate in visual studio. When you deploy to a real web server, just deploy them both to the same place. Do be careful about files both have in common (like web.config) though.
BTW, there is a very long discussion on this topic in the comments section of an article I posted up a while back. I think you might find it useful as the discussion went into detail about mixed projects at one point.