xofz
xofz

Reputation: 5660

If I have a solution folder, is it ok to name projects ProjectName instead of MyCompany.MySolution.ProjectName?

So the directory layout would look like:

Visual Studio 2008\
  Projects\
    MyCompany.MySolution\
      Models\
      Models.Tests\
      Services\
      Services.Tests\
      UI\
      etc..

rather than

Visual Studio 2008\
  Projects\
    MyCompany.MySolution\
      MyCompany.MySolution.Models\
      MyCompany.MySolution.Models.Tests\
      MyCompany.MySolution.Services\
      MyCompany.MySolution.Services.Tests\
      MyCompany.MySolution.UI\
      etc..

The namespace for each project would of course be MyCompany.MySolution.MyProject.

The question was generated by concern over maximum character path limit of 260. It seems better to me to do whatever I can to be able to freely name my projects and solutions; however, I don't want to run into an unforeseen mess.

Upvotes: 0

Views: 81

Answers (1)

Ben Griswold
Ben Griswold

Reputation: 18381

If you run up the character path limit, you have to do something and you have to get creative. In this case, it is reasonable to alter the filename to a less-than ideal convention. Demoting the project names from including the complete namespace to merely the project name seems reasonable. Otherwise, consider using acronyms whenever you can. This approach will help a bunch.

Upvotes: 1

Related Questions