Marco Trova's weblog

Italian .NET life

ASP.NET Applications without Web Projects

Fritz Onion has wrote a litte article about not using Web projects to build asp.net applications:

The Web Project wizard in Visual Studio .NET is convenient for creating quick ASP.NET applications on your local machine, but in an effort to simplify your life, it also makes many decisions for you that are difficult to change if you need more flexibility. My biggest pet peeve with Web Projects is that you cannot even open a .sln file if the virtual directory mapping in IIS is not set up correctly. I also dislike the way it places .sln and .csproj | .vbproj files in a separate location from the actual source files (I understand that this is necessary to allow application creation directly on a server, but I never deploy that way).

As a result, most of my web projects are created as standard class library projects. Unfortunately this means that you don't get the nice Web component wizards (like WebForms and UserControls). However, with a little tweaking, you can have it all.  I have prepared this document describing how to enable these wizards in class library projects (thanks to Dan Sullivan for pointing out how to do this), as well as how to convert existing Web Projects to class library projects and still keep the nice integrated debugging.

I usually modify .webinfo file to reflect current virtual/site settings..

Comments

Doug Thews said:

Actually, you can put .sln files in the virtual directory on your dev machine (or server). I just to a XCOPY deploy (minus the .sln file) to the prod web server after testing on my dev machine.

The problem comes in when you get into multiple developers - especially in VSS. They cannot share the same .sln files because their working directories and machine names differ.
# July 5, 2003 4:59 AM

Marco said:

Yes and that is the motivation that we have the same directory structure on every development machine.. :-/
# July 5, 2003 8:08 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)