Most of my time is spent on Whidbey and Anson and I have been working on the project templates and the add item templates for Whidbey.

One of the issues we are currently looking at is the need for namespace entries in the code that gets generated when you either create a project or when you add items to a project. I'm sure that everyone has already seen the current behavior in VS 2002/2003:

  • When you create a project you get asked for the project name. We use this as the “default namespace“ for the project. All the code generated as part of the project creation gets put into this default namespace.
  • When you Add an Item to the project we generate a namespace for the code using the default namespace stored as part of the project. There's a slight twist to this, if you have added a directory to your project structure we append the directory names to the default namespace.

You can change the default namespace property in the project properties (Common Properties.General page) and you also modify the code that gets generated as part of project creation or add items by modifying the code contained at:

  • C:\Program Files\Microsoft Visual Studio .NET 2003\VC#\VC#Wizards

Be careful modifying the code or filenames associated with our wizards - there are JScript wizards working in the background (don't ask me why) that don't take kindly to modifications (I know from experience)

So here's the question:

Do you use the default namespace and the VS behavior to generate the right namespace entries or do you simply manually modify them after the code gets generated?

Anson and I were talking about removing the namespace declarations from the templates the other day, how would this affect you?