Monday, March 27, 2006

Dude, where's my namespace?

So, lots has changed in Web Project land between VS 2003 and 2005 (See Scott's excellent summary explaining the changes). No more project files, no Front Page Server Extensions (FPSE), no compiled binaries - and no namespaces! Yarrrgh!


For example, I created a User Control folder and put a control in there. My new user control is named UserControl_ControlName. Underscore? What happened to my nice namespaces, Web.UI.UserControls? I want my namespaces back, waahh. This isn't good, how do I organize stuff? How do I not get lost in a sea of files with a**x extensions? Sometimes there is a need to create non-visual 'helper' classes in a web project; classes that assist the UI and know all about the presentation layer. I don't want to create another project for these classes, and I don't want their names preceded with underscores. Well, Maybe I can configure VS2005 to give me back my namespaces, and my dlls too.


In my infinite wisdom I decided to take matters into my own hands and wrap my control class in a namespace and change the class name to remove the 'UserControls_' prefix. This was unwise. There is stuff happening that I don't yet understand. I suspect that classes in new VS2005 web projects are not expected to be organized into folders, as tacking the folder name to the front of the class name is just so absolutely ridiculous. I am afraid I am at a loss, and must succumb to the drag and drop development model for the time being.

No comments:

Post a Comment