Paul Turner
Paul Turner

Reputation: 39685

Is there a way to set the default namespace of a project as it is created?

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

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?

Upvotes: 5

Views: 2432

Answers (1)

Jarek Kardas
Jarek Kardas

Reputation: 8455

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

Upvotes: 2

Related Questions