5

When creating a project in Visual Studio, the name you use for the project is used to:

  • Name the project file
  • Name the project folder
  • Generate the default namespace for the project

The first two values are somewhat related, so it makes sense to keep them the same from a convention point of view, however using the value for a namespace causes problems:

Either you make your project names into namespaces, leading to very long file paths (which often cause problems with MSBuild when they exceed the 248 length limit for windows, you get given a default namespace which doesn't follow normal naming conventions and then has to be changed with Find-and-Replace.

I've been working around this problem for 12 years now and it's not getting any more fun.

Is there some method for setting these values separately at the point you're setting up the project?

Paul Turner
  • 38,949
  • 15
  • 102
  • 166

1 Answers1

2

There's no way to do it during project creation, but you can change default namespace right after from Project Properties | Application | Default namespace

Jarek Kardas
  • 8,445
  • 1
  • 31
  • 32
  • 1
    Changing it after is the pain I want to avoid. The property itself is easy to change, but then I must go through all the template-generated code and replace the old values. – Paul Turner Jan 31 '13 at 14:15